Identify open forms

In VB.net, how can I tell whether a given form is currently open?  I have some subroutines that I want to exit if a particular form is still open or run to completion if the form is not open, but I don't know the code to determine if the form in question is open or not.

T
T HoecherlDeveloperAsked:
Who is Participating?
 
CodeCruiserConnect With a Mentor Commented:
You can either see if its Disposed or not and then if its Visible is true.

You can also get all open forms from

Application.OpenForms

collection.
0
 
Alpesh PatelAssistant ConsultantCommented:
Hi you can check the child of master (MDI) form if you have.

Application.OpenForms is the syntax of vb 6.0
0
 
mlmccCommented:
I've requested that this question be deleted for the following reason:

This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0
 
T HoecherlDeveloperAuthor Commented:
I am prepared to accept the solution from Codecruiser and award points, but I cannot do so because of the deletion request.  Please cancel the deletion so I can accept the solution.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.