Hi,
The whole form can be moved by clicking on any location other than the title bar using the code in the below given link.This example considers that there is no border for the form.That case can be ignored.
TechiSolutions Solution
Cheers..
Thanks for the link.
I could not get it to work. More specifically, the set to the property of the m.result does not do anything.
I'll keep playing with it until it works.
I'm sure i'll be able to do something with it.
Thanks again
btw, here is the code (*converted from C# to VB):
-
Protected Overrides Sub WndProc(ByRef m As Message)
-
' Let the base class have first crack
-
MyBase.WndProc(m)
-
Dim WM_NCHITTEST As Integer = 132 ' winuser.h
-
' If the user clicked on the client area,
-
' ask the OS to treat it as a click on the caption
-
If m.Msg <> WM_NCHITTEST Then
-
Return
-
End If
-
Dim HTCLIENT As Integer = 1
-
Dim HTCAPTION As Integer = 2
-
If m.Result.ToInt32() = HTCLIENT Then
-
m.Result = CType(HTCAPTION, IntPtr)
-
End If
-
End Sub
-