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