VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



A Move a form without a title bar

by rikkter (1 Submission)
Category: Custom Controls/Forms/Menus
Compatability: Visual Basic 3.0
Difficulty: Beginner
Date Added: Wed 3rd February 2021
Rating: (19 Votes)

Move any form without a title bar! You can use a label, command button, picturebox, anything to move the form.

Rate A Move a form without a title bar

'Put this in a module:
Declare Sub ReleaseCapture Lib "user32" ()
Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wparam As Integer, ByVal iparam As Long) As Long
Public Sub formdrag(theform As Form)
  ReleaseCapture
  Call SendMessage(theform.hWnd, &HA1, 2, 0&)
End Sub
'**************
'put this in the object that u want to move the form in the MouseDown:
formdrag Me
'thats it...vote for me if u like it...or email me if u need help...it should work...worked for me

Download this snippet    Add to My Saved Code

A Move a form without a title bar Comments

No comments have been posted about A Move a form without a title bar. Why not be the first to post a comment about A Move a form without a title bar.

Post your comment

Subject:
Message:
0/1000 characters