Hello
In assuming that you intend to dynamically add menu items based upon some
need during runtime your handler sub only needs to look like the code below.
You would be using the same handler for all of the added menu items. Within
that handler you could branch off to different procedures based upon the
value of the sender object. If the menu additions are part of a 'Plug-In'
scheme you could use reflection to direct execution flow to the proper
procedures.
Private Sub MenuClickhandler(ByVal sender As Object, _
ByVal e AsSystem.EventArgs)
End Sub
--
Ibrahim Malluf
http://www.malluf.com
==============================================
MCS Data Services Code Generator
http://64.78.34.175/mcsnet/DSCG/Announcement.aspx
==============================================
Pocket PC Return On Investment Calculator
Free Download
http://64.78.34.175/mcsnet/kwickKalk1.aspx
"tmaster" <le*******@travelmasterusa.com> wrote in message
news:BX****************@fe1.columbus.rr.com...
When I am typing the argument(s) of the Add method of MenuItems, one of
the options (#2 of 5) provides for 'OnClick as System.EventHandler' (as the
second arguement), which I hope is to provide a reference to the 'Handler'
sub:
mnuTopics.MenuItems.Add("DoSomething", DoSomething_Handler)
What is the corresponding sub syntax? The following is not the correct
syntax.
Private Sub mnuTopics_DoSomething_Handler(ByVal sender As Object, _
ByVal e As System.EventArgs) _
Handles mnuTopics.DoSomething_Handler
Thanks