Checking if an implicit instance is visible

I need to check if a form (flagged as implicit instance) is visible but if I check the form.visible it will load the form which I dont want to do. How can I check if an implicit instance is visible but not load the form if it is not visible. Thanks

use Window() and WindowCount() to walk through all the windows that are open and when you get to one that is the type you’re interested in check if it is visible (see

But unless you specifically add some code to know when you do
new WindowOfWhateverType
you’re unlikely to know if a window is visible because it was an implicit instance

Hi Norman, the form I am interested in is called frmTill and I have another form where I have a timer and thread that does some background processing but I only want to do this background processing if frmTill is visible, but frmTill is an implicit instance. Are you saying that if I check the visible on a no loaded form it won’t become loaded on checking the visible state

If you check visible or do anything with an implicit instance, it instanciates it.

It maybe time for you to learn how to use explicit instance. It is way easier for what you want to do.

Thanks Michael that is what I needed to know. I have implemented Normans suggestion and this is working exactly as I need. Re explicit instances, I do normally use them but with this project it was going to be something small and at the time implicit was a quicker way for me to do it but the project has grown and I might have to switch things around a bit.

Thanks to both of you for the help.

“Add a shared property called ‘isOpen’ or similar. In the open event of the window, set this to True, and False in the close event.”

but this will not tell you IF it is visible because you called it via the implicit instance OR because you used NEW

there really isnt any way to tell that

but there are ways to find out about instances etc using the technique I posted about above