Drag Form from anywhere without API (should work with all versions of VB)
Drag Form from anywhere without API (should work with all versions of VB)
API Declarations
Dim MouseLocationX As Integer
Dim MouseLocationY As Integer
Rate Drag Form from anywhere without API (should work with all versions of VB)
(1(1 Vote))
MousePress = 1
MouseLocationX = X
MouseLocationY = Y
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If MousePress = 1 Then
frmMain.Top = frmMain.Top + Y
frmMain.Left = frmMain.Left + X
End If
End Sub
Private Sub Form_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
MousePress = 0
End Sub
Drag Form from anywhere without API (should work with all versions of VB) Comments
No comments yet — be the first to post one!
Post a Comment