ContextMenu not showing on Button

  • Thread starter Thread starter Mantorok
  • Start date Start date
M

Mantorok

Hi

I have a button on a Windows Form and it has a ContextMenu set, when the
user clicks the button I want the menu to appear, I've tried this:

btnMenu.ContextMenuStrip.Show();

Absolutely nothing happens.

Any ideas?
Thanks
Kev
 
You mentioned ContextMenu and ContextMenuStrip. These are different
components. Ensure that you're setting either the ContextMenu or
ContextMenuStrip property with the appropriate component. Then call one of
the Show method overloads that allows you to specify the location. For
example...

this.btnMenu.ContextMenuStrip.Show(this.btnMenu, 0, 0);
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top