MainMenu and MenuItems

F

Felicity

Hello,

I am developing a security component for a windows forms
application for my company. I want to be able to apply
security to MainMenu objects and their associated
MenuItems using a generic function. My problem is that I
cannot seem to get access to the collection of MainMenu
objects on any given form. I generally have 2 or 3
MainMenu objects on each form. However, I can only can
access to the one that is currently set as the Form's Menu
object using the Menu property of the form. How can I do
this??? Please help ???

regards,

Felicity
 
D

Dmitriy Lapshin [C# / .NET MVP]

Hello,

For any other control placed on a form, a member variable is created so you
can access the control through this member variable. I have never tried
multiple main menus but I suggest this is also the case for MainMenu
components. Therefore, all you need to do if my assumption is correct is to
determine the name of the member variable corresponding to each of the menus
and work with it as usual.

Hope this helps.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top