急求~~一道vb程序的阅读,哪位高手能帮我读一下

DimI,J,KAsIntegerRem单击“水平移动”按钮事件PrivateSubCommand1_Click()I=0'变量I赋初值0Rem使图像框ImageK大小与... Dim I, J, K As Integer
Rem 单击“水平移动”按钮事件
Private Sub Command1_Click()
I = 0 '变量I赋初值0
Rem 使图像框ImageK大小与位置和图片框一样
ImageK.Width = Picture1.Width '设置图像框ImageK的宽度与图片框的宽度一样
ImageK.Height = Picture1.Height '设置图像框ImageK的高度与图片框的高度一样
ImageK.Left = 0 '设置图像框ImageK的距图片框左间距为0
ImageK.Top = 0 '设置图像框ImageK的距图片框顶间距为0
Timer1.Enabled = True '使时钟Timer1有效
Timer2.Enabled = False '使时钟Timer2无效
End Sub
Rem 单击“逐渐变大”按钮事件
Private Sub Command2_Click()
J = 0 '变量J赋初值0

ImageK.Width = Picture1.Width / 10
ImageK.Height = Picture1.Height / 10
ImageK.Left = Picture1.Width / 2 - ImageK.Width / 2
ImageK.Top = Picture1.Height / 2 - ImageK.Height / 2
Timer2.Enabled = True
Timer1.Enabled = False
End Sub

Private Sub Timer1_Timer()
If I > 5 Then
I = 0
End If

If ImageK.Left > 0 Then
ImageK.Left = ImageK.Left - 100
Else

ImageK.Picture = Imgcat(I).Picture
If I > 0 Then
ImageBac.Picture = Imgcat(I - 1).Picture
End If
I = I + 1 '
ImageK.Left = Picture1.Width
End If
End Sub

Private Sub Timer2_Timer()
If J > 5 Then
J = 0
End If

If ImageK.Width < Picture1.Width Then
ImageK.Width = ImageK.Width + 50
ImageK.Height = ImageK.Height + 70
ImageK.Left = Picture1.Width / 2 - ImageK.Width / 2
ImageK.Top = Picture1.Height / 2 - ImageK.Height / 2
Else

ImageK.Picture = Imgcat(J).Picture
If J > 0 Then
ImageBac.Picture = Imgcat(J - 1).Picture
End If
J = J + 1

ImageK.Width = Picture1.Width / 100
ImageK.Height = Picture1.Height / 60
ImageK.Left = Picture1.Width / 2 - ImageK.Width / 2
ImageK.Top = Picture1.Height / 2 - ImageK.Height / 2
End If
End Sub
Private Sub Command3_Click()
End
End Sub

翻译每句是什么意思,越具体越好
拜托了
可追加悬赏分
展开
 我来答
cang_2009
2010-01-06 · TA获得超过181个赞
知道小有建树答主
回答量:258
采纳率:0%
帮助的人:0
展开全部
Dim I, J, K As Integer
Rem 单击“水平移动”按钮事件
Private Sub Command1_Click()
I = 0 '变量I赋初值0
Rem 使图像框ImageK大小与位置和图片框一样
ImageK.Width = Picture1.Width '设置图像框ImageK的宽度与图片框的宽度一样
ImageK.Height = Picture1.Height '设置图像框ImageK的高度与图片框的高度一样
ImageK.Left = 0 '设置图像框ImageK的距图片框左间距为0
ImageK.Top = 0 '设置图像框ImageK的距图片框顶间距为0
Timer1.Enabled = True '使时钟Timer1有效
Timer2.Enabled = False '使时钟Timer2无效
End Sub
Rem 单击“逐渐变大”按钮事件
Private Sub Command2_Click()
J = 0 '变量J赋初值0

ImageK.Width = Picture1.Width / 10 '设置图像框ImageK的宽度为图片框Picture1的宽度的1/10
ImageK.Height = Picture1.Height / 10 '设置图像框ImageK的高度为图片框Picture1的高度的1/10
ImageK.Left = Picture1.Width / 2 - ImageK.Width / 2 '设置图像框ImageK与图片框Picture1左右对中
ImageK.Top = Picture1.Height / 2 - ImageK.Height / 2 '设置图像框ImageK与图片框Picture1上下对中
Timer2.Enabled = True '使时钟Timer2有效
Timer1.Enabled = False '使时钟Timer1无效
End Sub

Private Sub Timer1_Timer()
If I > 5 Then
I = 0
End If

If ImageK.Left > 0 Then '如果图像框ImageK 没移到最左边
ImageK.Left = ImageK.Left - 100 '使图像框ImageK 一直往左移,每次移100
Else

ImageK.Picture = Imgcat(I).Picture '设置图像框ImageK的图片为图像框Imgcat(I)的图片
If I > 0 Then
ImageBac.Picture = Imgcat(I - 1).Picture '设置图像框ImageBac的图片为图像框Imgcat(I - 1)的图片
End If
I = I + 1 '
ImageK.Left = Picture1.Width '设置图像框ImageK的左边坐标为图片框Picture1的宽度
End If
End Sub

Private Sub Timer2_Timer()
If J > 5 Then
J = 0
End If

If ImageK.Width < Picture1.Width Then '如果图像框ImageK的宽度小于图片框Picture1的宽度,则
ImageK.Width = ImageK.Width + 50 '设置图像框ImageK的宽度增加50
ImageK.Height = ImageK.Height + 70 '设置图像框ImageK的高度增加70
ImageK.Left = Picture1.Width / 2 - ImageK.Width / 2 '设置图像框与图片框左右对中
ImageK.Top = Picture1.Height / 2 - ImageK.Height / 2 '设置图像框与图片框上下对中
Else

ImageK.Picture = Imgcat(J).Picture '设置图像框ImageK的图片为图像框Imgcat(J)的图片
If J > 0 Then
ImageBac.Picture = Imgcat(J - 1).Picture '设置图像框ImageBac的图片为图像框Imgcat(J - 1)的图片
End If
J = J + 1

ImageK.Width = Picture1.Width / 100 '设置图像框ImageK的宽度为图片框Picture1的宽度的1/100
ImageK.Height = Picture1.Height / 60 '设置图像框ImageK的高度为图片框Picture1的高度的1/60
ImageK.Left = Picture1.Width / 2 - ImageK.Width / 2 '设置图像框ImageK与图片框Picture1左右对中
ImageK.Top = Picture1.Height / 2 - ImageK.Height / 2 '设置图像框ImageK与图片框Picture1上下对中
End If
End Sub
Private Sub Command3_Click()
End '结束程序
End Sub
384479289
2010-01-06 · 超过15用户采纳过TA的回答
知道答主
回答量:23
采纳率:0%
帮助的人:0
展开全部
Dim I, J, K As Integer
'定义局部变量I,J,K,I,J为变体型,K为整型
Rem 单击“水平移动”按钮事件
’注释事件
Private Sub Command1_Click() '按钮1的点击事件过程
I = 0 '变量I赋初值0
Rem 使图像框ImageK大小与位置和图片框一样
ImageK.Width = Picture1.Width '设置图像框ImageK的宽度与图片框的宽度一样
ImageK.Height = Picture1.Height '设置图像框ImageK的高度与图片框的高度一样
ImageK.Left = 0 '设置图像框ImageK的距图片框左间距为0
ImageK.Top = 0 '设置图像框ImageK的距图片框顶间距为0
Timer1.Enabled = True '使时钟Timer1有效
Timer2.Enabled = False '使时钟Timer2无效
End Sub '结束过程
Rem 单击“逐渐变大”按钮事件
Private Sub Command2_Click() '按钮2的点击事件过程
J = 0 '变量J赋初值0

ImageK.Width = Picture1.Width / 10 '设置图像框ImageK的宽度是图片框的宽度的1/10
ImageK.Height = Picture1.Height / 10 '设置图像框ImageK的高度是图片框的高度的1/10
ImageK.Left = Picture1.Width / 2 - ImageK.Width / 2 '设置图像框ImageK的左间距为图片框宽度的1/2减去图像框宽度的1/2
ImageK.Top = Picture1.Height / 2 - ImageK.Height / 2 '设置图像框ImageK的距顶部的距离为图片框高度的1/2减去图像框高度的1/2
Timer2.Enabled = True '计时器控件Timer2的活动属性Enabled为True
Timer1.Enabled = False '计时器控件Timer1的活动属性Enabled为False
End Sub ' 结束过程

Private Sub Timer1_Timer() '计时器Timer事件
If I > 5 Then
I = 0
End If
'当I大于5时,I=0
If ImageK.Left > 0 Then
ImageK.Left = ImageK.Left - 100
Else
'当图像框的左间距大于0时,图像框的左间距=原图像框的左间距-100
ImageK.Picture = Imgcat(I).Picture
If I > 0 Then
ImageBac.Picture = Imgcat(I - 1).Picture
End If
I = I + 1 '
ImageK.Left = Picture1.Width
End If
End Sub

Private Sub Timer2_Timer()
If J > 5 Then
J = 0
End If

If ImageK.Width < Picture1.Width Then
ImageK.Width = ImageK.Width + 50
ImageK.Height = ImageK.Height + 70
ImageK.Left = Picture1.Width / 2 - ImageK.Width / 2
ImageK.Top = Picture1.Height / 2 - ImageK.Height / 2
Else

ImageK.Picture = Imgcat(J).Picture
If J > 0 Then
ImageBac.Picture = Imgcat(J - 1).Picture
End If
J = J + 1

ImageK.Width = Picture1.Width / 100
ImageK.Height = Picture1.Height / 60
ImageK.Left = Picture1.Width / 2 - ImageK.Width / 2
ImageK.Top = Picture1.Height / 2 - ImageK.Height / 2
End If
End Sub
Private Sub Command3_Click()
End
End Sub

Rem和'后面的是注释,上半部分解释过了,下面的以此类推,很简单的,就是一个计时器事件,单击事件设置图片框和图像框的大小和位置的。
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式