How do I make a windows form that can be dragged over the screen without title bar?

Hello

I was wondering how do I make a windows form that can be dragged over the screen without using a title bar. It would be really handy. I will appreciate any help you could give me.

thanks in advance.

Jason


Answer this question

How do I make a windows form that can be dragged over the screen without title bar?

  • jshunter@mngt.waikato.ac.nz

    Thanks, I'll try that out.

  • _hunter

    I assume you know how to create a form with no title bar.  As the title bar is what's used to move a form, you need to catch mouse events in your form and move it's position yourself to create this sort of effect.  Just catch mouse down and mouse up to detect if the mouse is being held, and mouse move to move your form ( store your initial pos on mouse down, move based on the difference on mouse move, and update the stored position to the current, ready for the next event.


  • How do I make a windows form that can be dragged over the screen without title bar?