Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Create Firefox 4 Style Button and Drop Down Menu on Form Title Bar C#

Tags:

c#

winforms

As the title says, I am wondering if it is possible to implement a Drop Down Menu on the Title Bar of my Form, similar to Firefox 4's:

removed dead ImageShack link

Firefox Menu Image 2

Is it possible for me to do this with C# and WinForms? If so, how? It doesn't have to be very fancy like the Office Ribbon. In fact it can look exactly the same as the Firefox button, but with my applications name instead.

like image 241
Kryten Avatar asked Oct 04 '10 16:10

Kryten


1 Answers

Yeah, no problem. Set the form's ControlBox property to False and the Text property to an empty string. The menu is tougher, you'll have to approximate it with a ContextMenuStrip. Google WM_NCHITTEST to restore the window behavior that is lost because of the missing title bar.

like image 148
Hans Passant Avatar answered Oct 27 '22 11:10

Hans Passant