i'm working on a simple overlay application, which border style is set to "none".
i want to be able to drag my Winform, no matter if I click on the Form or on its control.
i found this snippet:
protected override void WndProc(ref Message m)
{
switch(m.Msg)
{
case 0x84:
base.WndProc(ref m);
if ((int)m.Result == 0x1)
m.Result = (IntPtr)0x2;
return;
}
base.WndProc(ref m);
}
move a c# form without border style (by ShaneB)
This snippet allows me to make the form dragable, if I don't click on a control.
The Form should be dragable on other controls too (like groupboxes), while the mouseDown event is triggered.
Remark: A checkbox should still be able to be checked / unchecked, if possible. If the last point should be to complex, I can work around this problem.