471,059 Members | 1,450 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,059 software developers and data experts.

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 762

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

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.