Move borderless forms with ease by dragging anywhere on the form itself.
Move borderless forms with ease by dragging anywhere on the form itself.
API Declarations
Private DX As Single
Private DY As Single
Rate Move borderless forms with ease by dragging anywhere on the form itself.
(1(1 Vote))
If bMoving = False And Button = vbLeftButton Then
DX = X
DY = Y
bMoving = True
End If
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If bMoving And ((X <> DX) Or (Y <> DY)) Then
Move Left + (X - DX), Top + (Y - DY)
End If
End Sub
Private Sub Form_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = vbLeftButton Then
bMoving = False
End If
End Sub
Move borderless forms with ease by dragging anywhere on the form itself. Comments
No comments yet — be the first to post one!
Post a Comment