Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

programs does not close correctly

Status
Not open for further replies.

TerraSamba

Programmer
Aug 19, 2002
57
NL
my program does not close correctly, I have one KillApp routine that destroys all the objects, but afterwards the program is still visible in the task manager as a not responding program.

Has anybody any idea what could be the cause? The program uses the Inet object to retrieve files from an FTP server.

Hope anybody got some suggestions...

The gap between theory and practice is not as wide in theory as it is in practice.
 
it is a one-form program, and for my feeling I really destroy everything, up to the fact that I loop through the collections and set every single item to nothing.

Is there something like a known-issue regarding the closing of the inet object?

The gap between theory and practice is not as wide in theory as it is in practice.
 
Oddly if you do this,

Set myform = nothing
Unload myform

The form will not unload, remove the set myform = nothing

Maybe this is the problem ?

 
No, the forms are not the problem ...

for security I have used now
Do While Forms.Count > 1
Unload Forms(0)
Loop
But that changes nothing

Only when I have accessed the ftp section (through Inet) the program is unable to terminate.

I have stepped through the exiting code and there is no object alive before I give the end command. So I hoped anyone knew about some known issue I'm overlooking.



The gap between theory and practice is not as wide in theory as it is in practice.
 
>before I give the end command

Don't use the end command. It will bypass all form unloading code etc. It is the same as pressing the stop button in the IDE.



Take Care

Matt
If at first you don't succeed, skydiving is not for you.
 
that's it .... it was still unloading !!!
Thanx Matt (to Semper as well for the input)

The gap between theory and practice is not as wide in theory as it is in practice.
 
If there are no objects loaded but the app appears in the TaskManager then there could be some code still being executed. To test this temporarily add an END statement after you exiting code this should always force the app to terminate. (Using the END statement is bad practice and should normally be avoided)

By the way your loop will not unload the last form, in your apps case the only form. s/be Do While Forms.Count > 0




 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top