# 试试这个!

Posted by 大汉堡 on August 28, 1999 at 01:43:55:

In Reply to: 请问Form问题........ posted by 小洪 on August 27, 1999 at 21:49:04:

Dim Is_down As Boolean
Dim Cx, Cy As Integer
Private Sub Form_Load()
Is_down = False
End Sub
Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Is_down = True
Cx = X
Cy = Y
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Is_down Then
Form1.Left = Form1.Left + X - Cx
Form1.Top = Form1.Top + Y - Cy
End If
End Sub
Private Sub Form_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
Is_down = False
End Sub

Follow Ups: