Search code examples
c#winformsvisual-studio-2008buttontoolstrip

How do I make a button on a form behave like a button on a toolStrip? VS2008


How do I make a button on a form behave like a button on a toolStrip?

I want a menu-type list to come down. I tried using a toolStripContainer but it is very hard to manipulate to get it to behave as just one button.

Is there an easier way than just putting a toolStrip with one button in a toolStripContainer?

Thanks.


Solution

  • Forget the ToolStripContainer, just use a ToolStrip (with 1 button).

    set

    toolStrip1.Dock = DockStyle.None;
    toolStrip1.AutoSize = true