P.T.A.M. Administrator

Joined: 08 Oct 2003 Posts: 752 Location: Greece
|
Posted: Oct 10th, 2003 07:44 AM Post subject: Moving Forms or items at runtime, non API way |
|
|
Form example :
| Code: | Option Explicit
Dim XX As Integer
Dim YY As Integer
Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
XX = X
YY = Y
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = vbLeftButton Then
Me.Left = Me.Left - XX + X
Me.Top = Me.Top - YY + Y
End If
End Sub |
_________________ No one is completely useless. They can at least be an example of what to avoid. |
|