VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Drag a form without API code

by Yarden Peleg (1 Submission)
Category: Custom Controls/Forms/Menus
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Tue 1st April 2003
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Drag a form without API code

API Declarations


Dim Moving As Boolean
Dim cX, cY


Rate Drag a form without API code



Moving = True
If Moving = True Then
   cX = X
   cY = Y
End If
End Sub

Private Sub cap_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Moving = True Then
   Me.Left = Me.Left - (cX - X)
   Me.Top = Me.Top - (cY - Y)
End If
End Sub

Private Sub cap_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
Moving = False
End Sub


Download this snippet    Add to My Saved Code

Drag a form without API code Comments

No comments have been posted about Drag a form without API code. Why not be the first to post a comment about Drag a form without API code.

Post your comment

Subject:
Message:
0/1000 characters