schenkp
asked on
Stopping a Form from being Dragged
HI,
I have a form that is set for FixToolWindows, but i can still drag it around the screen, i don’t want the user to have this ability but i want to keep this setting….
What do I change to have this happen?
I have a form that is set for FixToolWindows, but i can still drag it around the screen, i don’t want the user to have this ability but i want to keep this setting….
What do I change to have this happen?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Agarici, your version prevents form from closing by clicking x button. However, if form doesn't have Close button, it is OK.
protected override void WndProc(ref Message m)
{
if ( m.Msg == 0x0084/*WM_NCHITTEST*/ )
return;
base.WndProc(ref m);
}
hth,
A.