Audax321 Posted July 29, 2003 Posted July 29, 2003 Hello, I am dynamically creating some menuitems and have gotten the click events to work for each menuitem. But, I would also like to add a menuitem.select event for each menuitem. I tried doing it by looping through all the dynamically created controls with the index represented by an integer variable i each time running this: AddHandler mnuVol.MenuItems(i).Select, AddressOf VolMenuHandler But, the VolMenuHandler is not called when I mouse over a menuitem. Any help is appreciated. Thanks..:) Quote
*Experts* Volte Posted July 29, 2003 *Experts* Posted July 29, 2003 Are there, by any chance, child menuitems that belong to these items? If that is the case, the event won't be raised. Quote
Audax321 Posted July 29, 2003 Author Posted July 29, 2003 (edited) None of the menu items have any child menu items. Just to make sure I put code in the click event for each of the menuitems. So, everytime I clicked a menuitem it ran: MsgBox(mnuVol.MenuItems.Item(item.Index).IsParent) And they are false. Edited July 29, 2003 by Audax321 Quote
Audax321 Posted July 29, 2003 Author Posted July 29, 2003 I think I just figured out why the select event isn't working. I have the contextmenu being displayed when the user right clicks a NotifyIcon in the systray. If I have the same contextmenu display when the user clicks a command button on the form, the code works fine. Is there a way to have the select event get called with the contextmenu linked to the NotifyIcon??? I'm not sure why it would do this... Any ideas??? :confused: Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.