VB问题求高手 万分感谢

来源:百度知道 编辑:UC知道 时间:2024/07/04 09:09:09
在名称为 Form1 的上建立二个名称分别为 Cmd1、Cmd2,标题为“按钮一”、“按钮二”的命令按钮(要求程序运行后,如果单击“按钮一”,则把“按钮二”移到“按钮一”上,使两个按钮重合。
2.用VB程序实现,一个按钮从窗体的左边运动到右边,不停的运动。

3.一张IMAGE图片 从中间放大或缩小,用VB程序实现。
希望能加上中文解释 本人是菜鸟种的菜鸟 见谅多谢

Dim w As Long, h As Long, i As Integer, l As Long, t As Long
Private Sub Command1_Click()
Command2.Left = Command1.Left
Command2.Top = Command1.Top
End Sub

Private Sub Form_Load()
Timer1.Interval = 100
w = Image1.Width
h = Image1.Height
l = Image1.Left
t = Image1.Top
Timer2.Interval = 1000
Timer3.Interval = 1000
Timer3.Enabled = False
i = 1
End Sub

Private Sub Timer1_Timer()
Command3.Left = Command3.Left + 100
If Command3.Left > Me.Width Then Command3.Left = 0
End Sub

Private Sub Timer2_Timer()
Image1.Width = w * i
Image1.Height = h * i
Image1.Left = Image1.Left - Image1.Left / 2
Image1.Top = Image1.Top - Image1.Top / 2
i = i + 1
If i = 5 Then
Timer2.Enabled = False
Timer3.Enabled = True
End If
End Sub

Private Sub Timer3_Timer()
Image1.Width = w * i
Image1.Height = h * i
Image1.Left = Imag