I had to use menus on a form and corresponding event handlers on the click of menu items like this:
and later I have:Code:miMaintanence.MenuItems.Add(New MenuItem(strMenuCaption, New EventHandler(AddressOf Me.OpenMaintanenceForm)))
I will like to pass a parameter to the Sub OpenMaintanenceForm that's is executed after clicking on the Menu Item.Code:Private Sub OpenMaintanenceForm(ByVal sender As Object, ByVal e As System.EventArgs) ' ...some code here End Sub
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.




Reply With Quote