Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 202
  • Last Modified:

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
0
thoecherl
Asked:
thoecherl
1 Solution
 
CodeCruiserCommented:
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
 
thoecherlAuthor 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

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now