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.A dd("Item 1", New EventHandler(Ad dressOf 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.A dd("Item 1", New EventHandler(Ad dressOf mnu_Click))
mnu.MenuItems.A dd("Item 2", New EventHandler(Ad dressOf mnu_Click))
mnu.MenuItems.A dd("Item 3", New EventHandler(Ad dressOf mnu_Click))
Protected Sub mnu_Click(ByVal sender As System.Object, ByVal e As
System.EventArg s)
Dim i As Integer
' get index
i = sender.Index
' do something with i
' ...
End Sub
HTH,
Gabriele
"Martin Falta" <ma**********@a tlas.cz> wrote in message
news:eL******** ******@TK2MSFTN GP12.phx.gbl...
Hi all,
I need a help with following problem. I need to create a menu from dynamic
loaded assembly on the main form of my application. The menu is created
succesfully, but the events of this menu, which are defined in the dynamic
loaded assembly, are not raised. How can I raise them?
Martin
---
Odchozí zpráva neobsahuje viry.
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