views:

390

answers:

2

I want to make a right click menu for my winforms app. It will have the same two things in it no matter where it pops up. A little hunting and pecking leads me to the conclusion that winforsm either doesn't support this in a trivial way or has hidden it under some name I havn't guessed yet. I think I can make it work with the Click even and manually creating a menu in the right place, bla bla bla... Yuck, I can thing of a half dozon thing right now that I would get wrong the first time around. Someone has got to have a better way.

Am I missing some easy way to add this?

Is there some library/widget I can copy/paste in to handle the grunt work for me?

+6  A: 

Add a System.Windows.Forms.ContextMenuStrip item to the form, then set the form's ContextMenuStrip property.

MiffTheFox
Seems to work; checking to make sure it really does.
BCS
+1  A: 

Put a ContextMenuStrip on your form, design your menu, then set the ContextMenuStrip property on the form to the component created.

Michael Bray