VB6 Forms and modules loaded into memory

Hello Experts,
How can I determine what forms and/or modules are loaded in memory?
I have found that if I have a reference to something when a form/module is not loaded, like a label or variable, somewhere else in my application, it wants to load my form/module, even though it does not show the form because I have not given the .show command.  Then when I go to, what I think is, load/show the form it doesn't go through the form.load sequence because it is already loaded.  Is there a way to see a list of  what is in memory to find out if I've have other things hanging around that I don't want/need all the time?
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

There isn't anything I know of that can show you what is in memory.  You could produce a kludge and have some global variables that get set/cleared by the form's Load and Unload events.

You could also have the forms/classes sort-of "self" track.  Rather than global variables, you could declare module level variables in the classes and forms such as "Priavate m_IsLoaded as Boolean".  VB will automatically initialize these boolean variables to False, so you just have to have the Load event set the flag.  Then so that you can have code outside the form access the variable, write a simple little function "Public Function IsLoaded as Boolean" that just returns the value of m_IsLoaded (that way, anyone can read the variable, but you can't accidently set the variable outside the class).

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
all modules are loaded into memory during program load.

you can iterate the FORMS collection to see which ones have been loaded into memory.
Adam_930Author Commented:
Thanks, I was just hoping it was already available information.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.