hi,
i want to list out the sub-menu items from file menu of active application(foreground window) .
Is it possible to list out the sub-menu by program?
thanks in advance,
-Mahendran
Finding submenus in file menu
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.

Jean PaulRank #32 · 38.5K reputationPosted Nov 11, 2011, 12:33 AM EST
To achieve this, use the form reference to iterate over the Controls property. Find the control which is of MenuStrip type. ( I hope you are using MenStrip in winforms)
After getting the MenuStrip object you can use the Items property which are the top level menu items like File, Edit etc. Get the File item by searching using the text. Once you get the File item, cast it to ToolStripMenuItem and use the DropDown.Items property to get all sub menus.