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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to find out if a form is open... 2

Status
Not open for further replies.

herb8

Programmer
Sep 4, 2001
45
US
I am working in an mdi project and need to know if a form which is a non mdi child form is currently open. Is there any easy way of doing this?
Thanks, Matt
 
Matt
What about
Code:
If frmThatOtherForm.show = True Then ....
?

Just a thought
Scotty ::) "Learn from others' mistakes. You could not live long enough to make them all yourself."
-- Hyman George Rickover (1900-86),
 
Hi,

This will tell you if the form is loaded:
---------------------------------------------------
Dim f As Form
For Each f In Forms
If f.Name = "Form2" Then MsgBox "Yes master, " & f.Name & " at your service."
Next f
---------------------------------------------------

note that loaded is not the same as visible.
If you:
Form2.show
Form2.hide
the form will not be visible, but it will be loaded.

If you want to check if the form is visible use
If f.visible then ...


Sunaj
 
Thank you guys very much it was extremely helpful.
Sincerly, Matt
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top