Click to See Complete Forum and Search --> : IsLoaded


Surrendermonkey
February 16th, 2000, 06:18 AM
Hi. Thanks for reading.
I am writing a VB 6 app which sits in the systray. I have a cute icon and everything, no problem, tip text and right-click menu. However, I wish to have a left-click on this icon bring the form(s) to to the fore, (and show them if minimised). This itself is no problem for the main application form, but when I have more than one form loaded I encounter all sorts of difficulties with modality and zorder. I've had a look and am basically short of an "IsLoaded" function for the app's forms, so that I can show them in the right order. Clear..?
How can I establish whether or not an instance of a particular form is loaded?

Cheers,

surrendermonkey

Lothar Haensler
February 16th, 2000, 06:25 AM
take this as a starting point

Dim frm as VB.Form
for Each frm In VB.Forms
If frm.Name = "Form1" then
MsgBox "loaded"
End If
next frm

Surrendermonkey
February 16th, 2000, 07:49 AM
Nice One.
Thankyou.