zattz
asked on
C# enumerate all open winforms
Hi
How can I get a reference to all the open forms in my application? I want to change their positions.
Thanks
How can I get a reference to all the open forms in my application? I want to change their positions.
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
On any suitable event write below lines of code
FormCollection collections = Application.OpenForms;
foreach (Form f in collections)
{
f.Location = new Point(10, 10); // set you location here
}
Other way, you can pass it through constructor of each form;