Hi,

I'm writing a VB.NET component dll to dynamically build menus from a database. This functions fine. A form contains the menu, and I assume should also contain the delegate event handler to handle the clicks on the dynamic menu and then call the component dll again sending which menu item was clicked. My problem is this... how do I assign the delegate as the handler for all the menu items created in the dll? So far I've assumed that I could pass the delegate as an object and use the AddressOf() function during the MenuItems.Add() to assign the delegate as the event handler. Any help would be appreciated.

Adrian