ContextMenuStrip is actually the context menu, which is the menu that comes out after you right-click a form or control.
Drag one out of the toolbar and put it on the window.
Then make a series of settings, the setting method is the same as the previous MenuStrip, or set from the Items collection, of course, you can also enter the menu item directly above the ContextMenuStrip, and then double-click a menu item to switch to code view for logic encoding. With MenuStrip, if it is a multi-level menu, you can continue to set the collection in the DropDownItems of a single item. Such as
Context menu well, from where to see it Nikki, hehe, this problem is good, the context menu must depend on a form or control, such as I put a spllitercontainer in the form, The context menu is then bound to the Spllitercontainer Panel2. Select Panel2, set on Panel2 properties, stickers
Select the context menu on the Pannel2 's ContextMenuStrip property so that the context menu is bound to the control. Ah, post it to
Right click on the panel2 to come out Oh, click on other places mo useful OH
As for the context menu associated with the data, for example, with a row of data inside the DataGridView, this is described in the following DataGridView.
WinForm menu of ContextMenuStrip