|
-
Dec 26th, 2006, 07:26 PM
#1
Thread Starter
Frenzied Member
I'm closing window, but it's not killing process
I have this program that I made. It's not doing any multi-threaded stuff or creating any new process, or opening any new windows. After I start the program and click on the button that does some loops, when I click the "x" on the top right corner to close the window, I noticed in the task manager that the process is still running. When I run it at debug mode, I do the same thing and it is still going through the loop. Any idea why it's doing this? I've always thought closing the main window stops the process.
-
Dec 26th, 2006, 11:04 PM
#2
Re: I'm closing window, but it's not killing process
Try adding this line inside your loop.
Code:
Application.DoEvents();
-
Dec 26th, 2006, 11:09 PM
#3
Re: I'm closing window, but it's not killing process
Because your loop will run to completion unless you tell it to stop. Should the process simply stop without knowing where in the loop it's up to and whether doing so could damage your data or the system? If you want to exit without completing the loop then you need to place inside the loop to do so.
-
Dec 27th, 2006, 11:51 AM
#4
Thread Starter
Frenzied Member
Re: I'm closing window, but it's not killing process
I never knew that. Thanks.
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
|