Granting that all your menuitems are handled with one sub (which would be wise)....using addHandlers in your Form_Load or menu creation...
VB Code:
AddHandler MyMenuItem.Click, AddressOf MenuClick
You then code a function below that all clicks on the menu are directed to:
VB Code:
Protected Sub MenuClick(ByVal sender As Object, ByVal e As EventArgs) Select Case CType(sender, MenuItem).Text Case "Copy" 'do something or call some function Case "Paste" 'do something else or call some other function End Select End Sub




Reply With Quote