MainMenu and MenuItems

  • Thread starter Thread starter Felicity
  • Start date Start date
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
 
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.
 
Back
Top