468,484 Members | 1,652 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,484 developers. It's quick & easy.

A better way? Getting Menu Item Collection Into ContextMenu?

Ok the following works... but is ugly and static, need the same idea
but dynamic, so as the 'theOwner' form main menu is defined,
NotifyIcon.ContextMenu can be updated.

Dim the0 As MenuItem = theOwner.Menu.MenuItems(0)
Dim the1 As MenuItem = theOwner.Menu.MenuItems(1)

Dim theItems As MenuItem()

ReDim theItems(1)
theItems(0) = the0
theItems(1) = the1

NotiyIcon.ContextMenu = New ContextMenu(theItems)

I can get the Menu Items Collection, but can not seem to get the
collection converted to a MenuItem() array? That ContextMenu wants.
Thx in advanced.
Nov 20 '05 #1
0 736

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Mohit Gupta | last post: by
1 post views Thread by Ignacio X. Domínguez | last post: by
4 posts views Thread by Frank Rizzo | last post: by
5 posts views Thread by Brett Romero | last post: by
2 posts views Thread by gieforce | last post: by
reply views Thread by theflame83 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.