Windows form components enumarating does not work?

A

Adam Right

Hi,

I want to list components on the screen by enumarating the components.
For example, I am using toolstripmenu which is a component for windows
form.. But when i load the form, the components is null.

foreach(IComponent component in components.Components)
{
//my code is here
}


What is the reason for that?
Thanks...
 
G

Guest

I want to list components on the screen by enumarating the components.
For example, I am using toolstripmenu which is a component for windows
form.. But when i load the form, the components is null.

foreach(IComponent component in components.Components)
{
//my code is here
}

Where/when are you executing that? Within FormLoad it ought to work fine.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top