I have a borderless window (BorderStyle = None) where I would like to allow the user to click on the background (anywhere but one of the child controls) and move it around.
How would I go about doing that?
Thank you,
I have a borderless window (BorderStyle = None) where I would like to allow the user to click on the background (anywhere but one of the child controls) and move it around.
How would I go about doing that?
Thank you,
You just need to override OnMouseDown/OnMouseMove/OnMouseUp. These three methods provide the mouse events to move your form.
When the mouse is pressed, just track the mouse location. On move events, move the form with the mouse, and when the mouse is released, stop "moving".