Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21695

VB6. How to know if a Form is visible without loading it

$
0
0
Hello!

I have this project with many forms, opening, hiding, unloading, etc...
I want to add a cautionary process that watch if no form is showing, so it makes the main form show.

How do I do it?

Something like:
Code:

If NoFormIsShowing Then MainForm.Show
or
Code:

CountShowing = 0
For Each f in Forms
  if f.IsShowing then CountShowing = CountShowing + 1
next
If CountShowing = 0 Then MainForm.Show

(Note that if I ask the value of SomeForm.Visible and the form is not loaded, it will load the form. I need to do it without loading them)

Viewing all articles
Browse latest Browse all 21695


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>