How can I check that if the form is already open?

  • Thread starter Thread starter Shelby
  • Start date Start date
S

Shelby

Hi,
how can I check that if the form is already open?
Whenever I click on a button, it will open the form.
I would like to check if the form is open.
 
Assume that the form that you want to check on is Form2. In the Click
event of the button (on Form1)

If Form2 Is Nothing OrElse Not Form2.Loaded Then Form2.Load

HTH

David
 
Shelby,

I prefer it to disable the button when a form is opened and when it is
closed to enable the button again.

Cor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top