|
-
Mar 30th, 2006, 10:07 AM
#1
Thread Starter
Member
[RESOLVED] Initializing variables
Hi,
Is it safe to assume that variables (integers, boolean, singles) which are declared in a form's General Declarations section will always be initialized on a form's Load event?
How about if the form was loaded, unloaded and then loaded again? Will those variables in the GD section be initializiled by virtue of the fact that the form was unloaded?
It's always been my assumption that this was the case; am I incorrect?
Thanks,
Chris
Last edited by Hack; Mar 30th, 2006 at 01:15 PM.
-
Mar 30th, 2006, 10:10 AM
#2
Re: Initializing variables
Yes, all generally declared variable will be initialized on the load event.
Declan
Don't forget to mark your Thread as resolved.
Take a moment to rate posts that you think are helpful 
-
Mar 30th, 2006, 10:19 AM
#3
Thread Starter
Member
Re: Initializing variables
This may sound like a very "basic" question, but how can I check which forms are loaded or unloaded while the project is running?
Thanks again.
Chris
-
Mar 30th, 2006, 10:29 AM
#4
Re: Initializing variables
 Originally Posted by Mad_Max
This may sound like a very "basic" question, but how can I check which forms are loaded or unloaded while the project is running?
Thanks again.
Chris
You can't tell what are NOT loaded, but you can tell which ARE loaded by using something like
VB Code:
Dim frm As Form
For Each frm In Forms
MsgBox frm.Name
Next
For a large project, a msgbox would be impractical so that would be substituted with something more realistic. However, this code will ONLY display the names of the forms that ARE currently loaded.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|