VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Form Drag / Move

by Kevin Still (2 Submissions)
Category: Coding Standards
Compatability: Visual Basic 3.0
Difficulty: Advanced
Date Added: Wed 3rd February 2021
Rating: (3 Votes)

This code will make it so you dont have to use the title bar to move your forms/projects.

API Declarations
'Declarations
Private Declare Function ReleaseCapture Lib "user32" () As Long
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long

Rate Form Drag / Move

'Put This In Form_MouseDown
Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
ReleaseCapture
SendMessage Me.hwnd, &H112, &HF012, 0
End Sub

Download this snippet    Add to My Saved Code

Form Drag / Move Comments

No comments have been posted about Form Drag / Move. Why not be the first to post a comment about Form Drag / Move.

Post your comment

Subject:
Message:
0/1000 characters