CodeItBetter Programming Another VB Programming Blog

How to Move a Form without using its Title Bar

Posted on January 4, 2009
1
2
3
4
5
6
7
8
9
10
11
'Forms - How to Move a Form without using its Title Bar
Option Explicit
 
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 lParam As Long) As Long
 
Public Sub FormDrag(TheForm As Form)
    ReleaseCapture
    Call SendMessage(TheForm.hwnd, &HA1, 2, 0&)
End Sub
Filed under: Forms Leave a comment
Comments (0) Trackbacks (0)

No comments yet.


Leave a comment


 

No trackbacks yet.