VB will not Close Down 
Author Message
 VB will not Close Down

I have an ActivX exe that will not close down.

When I run the app in the IDE I am able to run the procedure to close all
windows and release all references and after a few seconds I get the IDE
back in design mode - all references are released  and the app shuts down.

When I run the compiled version I run the same code and it will not close
down.  The windows all close but the exe remains in memory.

The only difference (which may be very significant) is that the compiled
version does use threads - a behaviour that does not occur in the IDE.  I am
very aware of this and I do not believe that there are still references that
would hold it open.

Does anyone now how to fix or debug such a problem.  Any help would be much
appreciated.

Matthew



Tue, 11 May 2004 18:09:39 GMT  
 VB will not Close Down
Hi Matt,

I'm having the exact same problem. Please let me know if you find a
solution, and I'll do likewise.

Anthony


Quote:
> I have an ActivX exe that will not close down.

> When I run the app in the IDE I am able to run the procedure to close all
> windows and release all references and after a few seconds I get the IDE
> back in design mode - all references are released  and the app shuts down.

> When I run the compiled version I run the same code and it will not close
> down.  The windows all close but the exe remains in memory.

> The only difference (which may be very significant) is that the compiled
> version does use threads - a behaviour that does not occur in the IDE.  I
am
> very aware of this and I do not believe that there are still references
that
> would hold it open.

> Does anyone now how to fix or debug such a problem.  Any help would be
much
> appreciated.

> Matthew



Tue, 18 May 2004 01:33:36 GMT  
 VB will not Close Down
You can try this.

Public Declare Sub CoFreeUnusedLibraries Lib "OLE32" ()

Public Sub Liberar()
    CoFreeUnusedLibraries
    DoEvents
End Sub

This library free all the unused libraries called by your program.



Quote:
> Hi Matt,

> I'm having the exact same problem. Please let me know if you find a
> solution, and I'll do likewise.

> Anthony



> > I have an ActivX exe that will not close down.

> > When I run the app in the IDE I am able to run the procedure to close
all
> > windows and release all references and after a few seconds I get the IDE
> > back in design mode - all references are released  and the app shuts
down.

> > When I run the compiled version I run the same code and it will not
close
> > down.  The windows all close but the exe remains in memory.

> > The only difference (which may be very significant) is that the compiled
> > version does use threads - a behaviour that does not occur in the IDE.
I
> am
> > very aware of this and I do not believe that there are still references
> that
> > would hold it open.

> > Does anyone now how to fix or debug such a problem.  Any help would be
> much
> > appreciated.

> > Matthew



Tue, 25 May 2004 23:27:08 GMT  
 VB will not Close Down
This *really* does smack of unreleased references, circular references, or
loaded forms
As you are emptying the Forms collection, it is probably a circular
reference

One method to help at least determine which class(es) it is is to add
logging code in the Initialise and Terminate events then analyse the log
checking the number of Initialises and Terminates is equal
When/If you find one (or probably more, being circular refs) that do not
tally up you're at least in the ball park
--
Chris Anderson
(aka Merak on VISBAS-L)

Quote:


> > > I have an ActivX exe that will not close down.

> > > When I run the app in the IDE I am able to run the procedure to close
> all
> > > windows and release all references and after a few seconds I get the
IDE
> > > back in design mode - all references are released  and the app shuts
> down.

> > > When I run the compiled version I run the same code and it will not
> close
> > > down.  The windows all close but the exe remains in memory.

> > > The only difference (which may be very significant) is that the
compiled
> > > version does use threads - a behaviour that does not occur in the IDE.
> I
> > am
> > > very aware of this and I do not believe that there are still
references
> > that
> > > would hold it open.

> > > Does anyone now how to fix or debug such a problem.  Any help would be
> > much
> > > appreciated.

> > > Matthew



Wed, 26 May 2004 06:56:47 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. VB Tasks not closing down in Win98

2. Access not closing down

3. Application not closing down after printing reports

4. NT WS4.0/VB Form Unload Closes Down VB

5. Automatically closing down Access using code after a Modal window has been closed

6. Drop Down List Box - Drop Down portion does not always disappear after Click event

7. MAPI causes vb appl not shut down completely

8. .ldb not closing when .mdb is closed

9. VBA Project does not close when workbook is closed

10. Form does not close from the UpperRight X Close button

11. After closing my application, Task is active an will not close

12. window.close closes webbrowser but not the form itself

 

 
Powered by phpBB® Forum Software