Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

is there anyway to close all opened windows(not MDI)

Status
Not open for further replies.

dmsruthi

Programmer
Aug 17, 2005
19
US
Hi All,
Ive windows application(C#),in that i've one main window n from that window I can open multiple windows, when I get any network or fatal error I need to close all opened windows other than main window,


is there any way to do this

Note: not using MDI

Thanks

 
Create a class that holds an instance of all your forms that you would ever open. Then your main form can call it and use it. When an exception is caught, you can make your class close all the windows.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top