Change Windows Form Location without Title Bar

M

MikeZ

I want to create a windows application with a small topmost form. Because the
form is so small, It does not include title bar. Is there any control, so I
can use it to move FORM location by mouse? Thanks.
 
N

Nicholas Paldino [.NET/C# MVP]

MikeZ,

You don't need a control to do this. You just have to have a mouse down
event handler which keeps track of the position when the mouse button is
first pushed down. Then, attach a mouse move handler and set the position
of the form based on the difference between the current cursor position and
the original mouse position.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top