Thank you in advance for our help.
I have a program that, when the user exits out (X-closes the form), the
progam still appears to be running under Task Manager (Processes). I've
tried all kinds of things, making sure I set all my objects to null in the
form disposal method, etc. Nothing works. Is there something I can do to
make sure this program dies -- i.e., force it to kill off everything out
there?
Thank you,
Laszlo 4 1394
You could use Application.Exit() or Application.ExitThread(), but these are
pretty severe.
I would first make sure that any spawned child threads or processes are
terminated properly. This is usually the most common cause for applications
not terminating.
Also, when you are setting your objects to null or disposing them, remember
to check that any custom objects that you have (that are implementing
IDisposible) do not have code in their Dispose() methods that might be
hanging the application up.
I would start tracing through your form's Dispose() method just to make sure
that everything is getting cleaned up properly.
If you could post your Dispose() method code, that would help too.
--
HTH
Kyril Magnos
"I'm not a developer anymore, I'm a software engineer now!" :-)
"Laszlo Szijarto" <ls*******@nospam.mrdoc.cc> wrote in message
news:ce**********@sulawesi-fi.lerc.nasa.gov...
| Thank you in advance for our help.
|
| I have a program that, when the user exits out (X-closes the form), the
| progam still appears to be running under Task Manager (Processes). I've
| tried all kinds of things, making sure I set all my objects to null in the
| form disposal method, etc. Nothing works. Is there something I can do to
| make sure this program dies -- i.e., force it to kill off everything out
| there?
|
| Thank you,
| Laszlo
|
|
Thank you, I'll try all that. I tried to kill all threads, close all
FileStream objects, etc. I'm thinking that maybe some Interop components
I'm using aren't disappearing. For the time being, I'm running
process.Kill() for the current process, and that seems to wipe everything
out. I know it's severe, but I'm OK with that for now.
Thanks again,
Laszlo
Laszlo Szijarto <ls*******@nospam.mrdoc.cc> wrote: Thank you in advance for our help.
I have a program that, when the user exits out (X-closes the form), the progam still appears to be running under Task Manager (Processes). I've tried all kinds of things, making sure I set all my objects to null in the form disposal method, etc. Nothing works. Is there something I can do to make sure this program dies -- i.e., force it to kill off everything out there?
Have you started any extra threads which could be preventing it from
stopping?
--
Jon Skeet - <sk***@pobox.com> http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Hmmm, are you calling Marshal.ReleaseComObject on all your Interop
components immediately (or as soon as you can) after use? That could be the
key.
--
HTH
Kyril Magnos
"I'm not a developer anymore, I'm a software engineer now!" :-)
"Laszlo Szijarto" <ls*******@nospam.mrdoc.cc> wrote in message
news:ce**********@sulawesi-fi.lerc.nasa.gov...
| Thank you, I'll try all that. I tried to kill all threads, close all
| FileStream objects, etc. I'm thinking that maybe some Interop components
| I'm using aren't disappearing. For the time being, I'm running
| process.Kill() for the current process, and that seems to wipe everything
| out. I know it's severe, but I'm OK with that for now.
|
| Thanks again,
| Laszlo
|
| This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: T |
last post by:
How do you catch the "Exited" event when a process is terminated. In the following code sample the "myProcess_Exited" event is never called. Any help would be appreciated.
using System;
using...
|
by: James |
last post by:
Im having trouble building/running a program which was written under Visual
Studio 2000 & .NET Framework 1.0. Im now using a new installation of .NET
1.1 with Visual Studio 2003, otherwise there...
|
by: Seo Jae Ick |
last post by:
Hi? My name is Seo Jae Ick.
I have a problem with running a program on Linux RedHat 8.0.
GDB have reported this,
program exited with code 0377
I think, this statement comes when
1)...
|
by: Drew |
last post by:
I keep seeing this when I run my program in Visual Studio:
The thread '<No Name>' (0x894) has exited with code 0 (0x0).
What does this mean exactly? It doesn't seem to be causing a problem.
...
|
by: Martin Pöpping |
last post by:
Hello,
I´m writing a windows application in C-Sharp which makes long
calculations (10-40 minutes).
Very often I get messages like:
The thread 0xdb0 has exited with code 0 (0x0).
Although...
|
by: vve |
last post by:
I'm discovering a strange behaviour in an C# project using ZedGraph
(https://sourceforge.net/projects/zedgraph/).
After adding a signal to it, it seems that the clr goes mad for some
reason. I...
|
by: comedeyboy19 |
last post by:
Hi!
i am writing a program in C that is a reservation maker. it supposed to ask if you wanna get first class or business class, and rest i have to finish. seats 1-5 are for first class, and seats...
|
by: minishilpi |
last post by:
I have a question - I have this code below to send an email and I have referenced the Microsoft CDO Library 2000.
It doesn't throw any exception in the console window. It goes throughout the code...
|
by: leoiser |
last post by:
Hi all,
I converted one web application(Vb.Net) created in VS2005 Framework 2.0 to VS2008 framework 3.5. (This application is using Reportviewer8.0) After convertion I cant build the...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
| |