maskeri (1) [Avatar] Offline
On codeproject there is cool button menu in the C++ project called CButtonST. and BCMenu.

How this can be done in C#.

The MainMenu if associated to button control does neither have Show method nor does it support owner draw.
eebrown (89) [Avatar] Offline
Re: How to drop down a owner drawn menu from a button control?
This can certainly be done. The .NET Button class uses the same underlying button as the MFC button. You could derive a new class from the Windows Form's button class, as in:

public CButtonNet : System.Windows.Forms.Button
. . .

I have done an exact comparison, but I would expect that you can get to most if not all of the underlying features you would need to duplication the CButtonST implementation (not that they would all be easy!). Some of these features are already included by .NET 1.1, such as flat buttons and bitmap or icon display. Support for assigning mouse pointers and defining background images are part of the standard Control class. By deriving from Button, you can also override how the button is drawn to achieve whatever effect you wish.

Note that there is a ButtonBase class as well, that might serve as a better, or at least alternate, base class.

The next .NET version (2.0) has a number of button extensions, including MS Office-style buttons, and a very cool ToolStrip class that provides office-like toolbar features and functions. You can read about some of this at