I am creating a form which has no borders, but I want the user to be able to move it on clicking a button (the form is not locked).
How could I do it C#?
This is the "Move" I am talking about :
I am creating a form which has no borders, but I want the user to be able to move it on clicking a button (the form is not locked).
How could I do it C#?
This is the "Move" I am talking about :
The easiest way is "to say" to Windows that all form is a CAPTION.
good: it's easy and works as you cheat OS, so it behaves blindly.
bad: consider, for example, that making a double-click on your window will lead to maximize.
Other way is: track ouse down point, and mousemove and move your form accordingly.
All possible examples can find on post searching for:
Winforms - Click/drag anywhere in the form to move it as if clicked in the form caption, or following link provided in comments.
have you tried to call Win API SendMessage?
SendMessage(SYS_COMMAND, SC_MOVE);