I need to get the top controls of the form programmatically.
One of the Top control is ContextMenuStrip. But when I use foreac(Control c
in this.Controls), this type of controls are not included.
How can I do this using foreach()

Signature
Mike
Marc Gravell - 28 Oct 2007 10:07 GMT
ContextMenuStrip instances do not typically get added to the Controls
collection (although the Form's MenuStrip does); they are instead held
in the "components" collection (using the designer code).
Alternatively, you could look at the ContextMenuStrip property of the
Form and all the sub-controls in turn.
Marc