Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
x1 = X
y1 = Y
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 1 Then '如果单击鼠标左键则,拖动窗口
Form1.Move Form1.Left + X - x1, Form1.Top + Y - y1
End If
End Sub
Private Sub Image2_Click()
End
End Sub
Private Sub Image2_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Image2.Move Image2.Left + 20, Image2.Top + 20 '利用鼠标按下和放开来形成关闭按钮的动态效果
End Sub
Private Sub Image2_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
Image2.Move Image2.Left - 20, Image2.Top - 20
End Sub
Private Sub Timer1_Timer()
|