Dim lastx, lasty
Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
lastx = X
lasty = Y
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 1 Then
Form1.Left = Form1.Left + (X - lastx)
Form1.Top = Form1.Top + (Y - lasty)
End If
End Sub