Martin,
I don't know the details of your application, but when you add a MenuItem to
your menu you can specify the event handler:
mnu.MenuItems.Add("Item 1", New EventHandler(AddressOf mnu_Click))
If this doesn't work for you because you can get the address of the
procedure, you can use a common procedure for all the MenuItems events, then
using the Index property of the sender object you can at least find out what
was selected and take the appropriate actions.
For example:
' add items
mnu.MenuItems.Add("Item 1", New EventHandler(AddressOf mnu_Click))
mnu.MenuItems.Add("Item 2", New EventHandler(AddressOf mnu_Click))
mnu.MenuItems.Add("Item 3", New EventHandler(AddressOf mnu_Click))
Protected Sub mnu_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs)
Dim i As Integer
' get index
i = sender.Index
' do something with i
' ...
End Sub
HTH,
Gabriele
> Hi all,
>
[quoted text clipped - 9 lines]
> Zkontrolov?no antivirov?m syst?mem AVG (http://www.grisoft.cz).
> Verze: 6.0.500 / Virov? b?ze: 298 - datum vyd?n?: 10.7.2003