Marc Intes
Marc Intes

Reputation: 737

VB.net menustrip button

I want to create a button that drops down a menustrip when clicked. I was successful in using the menustrip alone with dropdowns but i want to make a button as the main trigger to dropdown the menus. Is this possible? Thanks in advance.

Upvotes: 0

Views: 1999

Answers (1)

Hans Passant
Hans Passant

Reputation: 942207

You can't dropdown a MenuStrip, it must be an item in the MenuStrip. Like the File item that's on every standard menu, use its ShowDropDown() method:

Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
    FileToolStripMenuItem.ShowDropDown()
End Sub

Upvotes: 2

Related Questions