List of open forms

  • Thread starter Thread starter Jeff
  • Start date Start date
* "Jeff said:
Is there an easy way to obtain a list of all open forms
within a windowsforms application?

You will have to store all open forms and remove them from the list if
they get closed.
 
* "Jeff said:
I was doing that but ran into limitations with message
boxes. Guess I will have to write my on message box
class. Bummer.

Why do you need a list of open forms?
 
The business tier this client communicates with has a 15
min timeout. When this happens the client app hides all
of the open forms and displays the login screen. When the
user logs in successfully, the forms are displayed again
and the user can resume where they left off.
 
Solution to the problem

Hi there Jeff,
I came across this issue when migrating some VBA code to VB.NET. Herfried is right, but there's a very quick-and-easy way of doing it. I found it at

http://www.ftponline.com/vsm/2002_12/online/hottips/lobel/default.aspx

In order to see pages two and three of the article you'll need to register (but it's free).

The solution requires adding two classes to your code and changing the class which your forms inherit from - it's a walk in the park.

Hope that helps - ask if not,

Regards,

Al
 
Back
Top