[VB.NET]ContextMenuStrip 的小问题

前端之家收集整理的这篇文章主要介绍了[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

猜你在找的VB相关文章