hello :wave:
I was wondering how to move a borderless form but only within the area of another borderless form.
Thanx
Printable View
hello :wave:
I was wondering how to move a borderless form but only within the area of another borderless form.
Thanx
Welcome to Forums, janewilder! :wave:
Try the following and let me know if it works for you:
VB Code:
Option Explicit Private Const WM_NCLBUTTONDOWN = &HA1 Private Const HTCAPTION = 2 Private Declare Function SendMessageLong Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long Private Declare Function ReleaseCapture Lib "user32" () As Long Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single) If Button = vbLeftButton Then ReleaseCapture SendMessageLong Me.hwnd, WM_NCLBUTTONDOWN, HTCAPTION, 0& End If End Sub
:bigyello: It worked. Thank you for the help!
Dear RhinoBull,
Can you please place some comment on the coding.
@danasegarane,
Read post#4 here: http://www.vbforums.com/showthread.p..._NCLBUTTONDOWN
and this page: http://msdn2.microsoft.com/en-us/library/ms645620.aspx