-
Jan 15th, 2013, 05:37 PM
#1
Thread Starter
Hyperactive Member
-
Jan 15th, 2013, 05:42 PM
#2
Re: Program doesn't really exit after unload process
I hope you are not using the keyword "End" to close your program? Read posts #10 and #13 here.
when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
https://get.cryptobrowser.site/30/4111672
-
Jan 15th, 2013, 05:48 PM
#3
Re: Program doesn't really exit after unload process
The End statement should never be used, except for reasons really serious.
If your application stay in memory means that not all component are been properly released.
Paradoxically End may be the cause of the problem.
On the main form you should ensure to unload all forms, use a routine like this to release all forms:
Code:
Private Sub CloseAllForms()
Dim f As Form
For each f in Forms
If f.Name <> Me.Name Then
Unload f
End If
Next
End Sub
-
Jan 15th, 2013, 06:04 PM
#4
Thread Starter
Hyperactive Member
Re: Program doesn't really exit after unload process
I already tried that, and it didn't solve problem With that code, program won't exit even if I start Task Manager.
-
Jan 15th, 2013, 06:21 PM
#5
Re: Program doesn't really exit after unload process
Knock up a small program, or heavily prune a copy of your existing program, only having the likely suspects in that small program.
Run that and report back (and maybe attach it ?).
When you said Opening Task Manger ended something, did you mean to say that you opened Task Manager then killed the process ?
You should try to be as clear and specific as possible, with your posts.
-
Jan 15th, 2013, 06:23 PM
#6
Re: Program doesn't really exit after unload process
As mentioned by others you should not use the End statement at all.
If your program fails to unload completely then that indicates that somewhere in your code you have loaded and object that is not being properly unloaded,
I've never worked with cSocket so I can't say if that may cause this problem or not.
That said since you have not told us what your program is doing nor shown any code there is not much we can do.
-
Jan 15th, 2013, 06:23 PM
#7
Thread Starter
Hyperactive Member
Re: Program doesn't really exit after unload process
Originally Posted by Bobbles
Knock up a small program, or heavily prune a copy of your existing program, only having the likely suspects in that small program.
Run that and report back (and maybe attach it ?).
OK, I will do that.
Originally Posted by Bobbles
When you said Opening Task Manger ended something, did you mean to say that you opened Task Manager then killed the process ?
You should try to be as clear and specific as possible, with your posts.
No, I meant from moment when I open Task Manager, it ends automatically. I'm sorry that I haven't specified that.
Last edited by MikiSoft; Jan 15th, 2013 at 06:26 PM.
-
Jan 15th, 2013, 07:31 PM
#8
Thread Starter
Hyperactive Member
Re: Program doesn't really exit after unload process
I solved problem!
First, you were right (of course) - problem was with "End" command because with that, program doesn't properly unload from memory. But second problem was with one currently loaded form - I put in that form not to unload when user clicks on 'X' button, and when I close main form, that form still remain loaded in memory because of that. I have fixed now that and it works.
Thanks to all people that tried to help me!
Last edited by MikiSoft; Jan 15th, 2013 at 07:49 PM.
-
Jan 15th, 2013, 07:33 PM
#9
Re: Program doesn't really exit after unload process
Have you got any hooks in your program that might be detecting if the task manager is open?
when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
https://get.cryptobrowser.site/30/4111672
-
Jan 15th, 2013, 07:49 PM
#10
Thread Starter
Hyperactive Member
Re: Program doesn't really exit after unload process
Originally Posted by Nightwalker83
Have you got any hooks in your program that might be detecting if the task manager is open?
No, because there's no need for that.
Tags for this Thread
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
|