Dim i, x1 As Double, y1 As Double, x2 As Double, y2 As Double Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single) i = 1 x1 = X y1 = Y End Sub Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single) If i = 1 Then x2 = X - x1+form1.lift y2 = Y - y1+form1.top form1.move x2,y2 End If End Sub Private Sub Form_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single) i = 0 End Sub  
|