天天看點

create a C# context menu from code

I try the one of your approach,

it works well in my computer. Below is my code:

>When I right-click on the textbox I get a menu with

Undo/Cut/Copy/Paste/Select All.  And when I right-click on the form I get

nothing

Have you already added your "AddContextMenu()" method into the

contruction method of your mainform?