Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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..:)

Posted (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 by Audax321
Posted

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:

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...