Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想创建一个单击时下拉菜单条的按钮。我成功地将 menustrip 与下拉菜单一起使用,但我想制作一个按钮作为下拉菜单的主要触发器。这可能吗?提前致谢。
您不能下拉 MenuStrip,它必须是 MenuStrip 中的一个项目。就像每个标准菜单上的 File 项一样,使用它的 ShowDropDown() 方法:
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click FileToolStripMenuItem.ShowDropDown() End Sub