Dmitriy
Wed Aug 20 01:58:26 CDT 2003
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.
--
Dmitriy Lapshin [C# / .NET MVP]
X-Unity Unit Testing and Integration Environment
http://x-unity.miik.com.ua
Deliver reliable .NET software
"Felicity" <Felicity@mex.com.au> wrote in message
news:095f01c366d3$2c64ec10$a301280a@phx.gbl...
> 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