# 为何我用程式码来作表单的拖曳可是无法得到预期的效果，为什么呢？？？

Posted by jordan on August 13, 1998 at 12:58:11:

Dim qx,qy,wx,wy

Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
qx = X: qy = Y
End Sub

Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 1 Then
wx = wx - (qx - X)
wy = wy - (qy - Y)
End If
End Sub

Private Sub Form_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 1 Then
Form1.Left = wx
Form1.Top = wy
End If
End Sub

Follow Ups:

- 可以呀?! 帅帅阿柳 23:31:34 8/14/98 (0)
- Re: 为何我用程式码来作表单的拖曳可是无法得到预期的效果，为什么呢？？？ 笑儿 18:40:13 8/13/98 (0)