Form_load executing during shutdown 
Author Message
 Form_load executing during shutdown

According to debug, my main form_load subroutine is re-executing during
my shutdown procedure. How/why is this occurring? Under what conditions
will it occur? The help file was singularly uninformative on this issue.


Tue, 28 Jun 2005 06:14:50 GMT  
 Form_load executing during shutdown
Forms will load when they're referenced. If you reference
that form after unloading it or setting it to nothing it will reload.

--
--

Quote:

> According to debug, my main form_load subroutine is re-executing during
> my shutdown procedure. How/why is this occurring? Under what conditions
> will it occur? The help file was singularly uninformative on this issue.



Tue, 28 Jun 2005 08:32:31 GMT  
 Form_load executing during shutdown
In the environment, start your program. Then put a breakpoint in the
Form_Load sub, and end the program normally. When it's stopped at the
breakpoint, use the Call Stack (in the IDE View menu) to see what
triggered the Form_Load. It'll take you to the line that caused it.

Roy Lewallen

Quote:

> According to debug, my main form_load subroutine is re-executing during
> my shutdown procedure. How/why is this occurring? Under what conditions
> will it occur? The help file was singularly uninformative on this issue.



Tue, 28 Jun 2005 14:13:46 GMT  
 Form_load executing during shutdown
Thank you.
Quote:

> In the environment, start your program. Then put a breakpoint in the
> Form_Load sub, and end the program normally. When it's stopped at the
> breakpoint, use the Call Stack (in the IDE View menu) to see what
> triggered the Form_Load. It'll take you to the line that caused it.

> Roy Lewallen


> > According to debug, my main form_load subroutine is re-executing during
> > my shutdown procedure. How/why is this occurring? Under what conditions
> > will it occur? The help file was singularly uninformative on this issue.



Tue, 28 Jun 2005 22:38:57 GMT  
 Form_load executing during shutdown
are you using something like:

dim f as new form1
f.show

... etc  to show the form, then somewhere in code saying

set form1 = nothing

f <> form1; f is a copy of form1, so referencing form1 specifically will
cause it to load.

--

Randy Birch
MVP Visual Basic
http://www.mvps.org/vbnet/
Please respond only to the newsgroups so all can benefit.


# According to debug, my main form_load subroutine is re-executing during
# my shutdown procedure. How/why is this occurring? Under what conditions
# will it occur? The help file was singularly uninformative on this issue.



Tue, 28 Jun 2005 11:00:33 GMT  
 Form_load executing during shutdown
Also read the MSDN article "The Lifecycle of Visual Basic Forms". It's
an eye-opener.
Quote:

> In the environment, start your program. Then put a breakpoint in the
> Form_Load sub, and end the program normally. When it's stopped at the
> breakpoint, use the Call Stack (in the IDE View menu) to see what
> triggered the Form_Load. It'll take you to the line that caused it.

> Roy Lewallen


> > According to debug, my main form_load subroutine is re-executing during
> > my shutdown procedure. How/why is this occurring? Under what conditions
> > will it occur? The help file was singularly uninformative on this issue.



Wed, 29 Jun 2005 01:20:40 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. Access controls during Form_Load

2. Form_Load() doesn't execute, form doesn't load

3. Internet Transfer Control (SP2)- Causes Delay during Program Shutdown

4. Executing a string as a VB cmd during runtime

5. Executing a function during runtime

6. Executing a function() during runtime

7. ocx code executes during vbg compilation ! (VB6)

8. Recordsaffected during async execute

9. Visual Studio Installer -- Custom .exe file to be executed during installation

10. Automatic Shutdown of Application when Windows is shutdown

11. Automatic shutdown of application when windows is shutdown

12. Automatic shutdown of application when windows is shutdown

 

 
Powered by phpBB® Forum Software