前端之家收集整理的这篇文章主要介绍了
[VB.NET]ContextMenuStrip 的小问题,
前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
ContextMenuStrip 的小问题 在ContextMenuStrip 怎么
添加二级
菜单? 例如 Dim popMenu As New ContextMenuStrip popMenu.Items.Add( "1111111 ") 是
添加1级
菜单 如何加2级的 请指教! __________________________________________________________________________ Dim AAA As Windows.Forms.ContextMenuStrip = New Windows.Forms.ContextMenuStrip() Dim BBB As ToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem Dim CCC As ToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem CCC.Name = "CCC " CCC.Text = "CCC " BBB.Name = "BBB " BBB.Text = "BBB " BBB.DropDownItems.AddRange(New ToolStripItem() {CCC}) AAA.Items.Add(BBB) Me.ContextMenuStrip = AAA __________________________________________________________________________ 谢谢 问题
解决了 给分 __________________________________________________________________________
原文链接:https://www.f2er.com/vb/263857.html