Passing parameters to menu handler
I had to use menus on a form and corresponding event handlers on the click of menu items like this:
Code:
miMaintanence.MenuItems.Add(New MenuItem(strMenuCaption, New EventHandler(AddressOf Me.OpenMaintanenceForm)))
and later I have:
Code:
Private Sub OpenMaintanenceForm(ByVal sender As Object, ByVal e As System.EventArgs)
' ...some code here
End Sub
I will like to pass a parameter to the Sub OpenMaintanenceForm that's is executed after clicking on the Menu Item.
On this case I will like to pass a string parameter (strFrormCaption) to set the Caption of the Form to be opened. How should I go to do this?
Thanks.