如何在visual basic.net中创建弹出菜单?
问题描述:
如何在 vb 2008 中创建一个弹出菜单以用作右键单击时的上下文相关菜单?
How can I create a popup menu in vb 2008 for use as a context sensitive menu for when I right-click?
答
首先,使用 ContextMenuStrip 控件创建上下文菜单.然后将该 ContextMenuStrip 分配给要使用上下文菜单的窗体或控件的 ContextMenuStrip 属性.
First, create the context menu using the ContextMenuStrip control. Then assign that ContextMenuStrip to the ContextMenuStrip property of the form or control you want to use the context menu with.