如何查询数据库后,将查询某字段的结果添加到右键菜单中
如题:请教一下,如何查询数据库后,将查询某字段的结果添加到右键菜单中?多谢了!
[解决办法]
http://topic.csdn.net/t/20041126/18/3592266.html
' Create an empty MainMenu.
Dim mainMenu1 As New MainMenu()
Dim menuItem1 As New MenuItem()
Dim menuItem2 As New MenuItem()
menuItem1.Text = "File "
menuItem2.Text = "Edit "
' Add two MenuItem objects to the MainMenu.
mainMenu1.MenuItems.Add(menuItem1)
mainMenu1.MenuItems.Add(menuItem2)
' Bind the MainMenu to Form1.
Menu = mainMenu1
'--添加菜单事件
AddHandler MenuItem.Click, New EventHandler(AddressOf MenuClick.MainMenu_Click)
---------
最详细的参考:
VB.net 动态添加菜单响应单击事件
http://blog.csdn.net/shadowsky/article/details/1651260