I have a Form with 3 MainMenus on it. I am trying to make as follows:
foreach menu in "MenuCollection"
menu.some_method
My Problem is that I do not know where the "MenuCollection" is.
I cannot create the collection manually.
I know that all controls on a Form are in Form.Controls, but MainMenu is not.
To which collection my menus belong to
Thanks in advance.

Multiple MainMenu problem
bllua
foreach (Menu m in MyForm.MainMenu)
{
m.some_method()
}
Fallendown
So, in your above post, you are correct: Form has a ControlCollection and all Controls are automatically added to this collection. Since things such as Menus or Timers are Components - they are not added to the ControlCollection.
You have a couple of options if you want to enumerate through all the MainMenus on your Form:
1) Manually do so. In other words: have explicit code for each MainMenu.
2) Add the MainMenus to a list or collection yourself. You could use an ArrayList object.
3) If you wanted to get tricky, you could use the Reflection classes to discover all the MainMenus that were related to your Form.
Good luck.
live cricket audio commentary
In a Form you have only one active MainMenu at a time and it is reachable through the "Form.Menu" property(get and set)
The best (and easiest) way to put them in a list is to use the ArrayList object
Cheers,
Gogou