Re: Process won't die when form is closed.
- From: "Bruce Wood" <brucewood@xxxxxxxxxx>
- Date: 25 Feb 2007 23:31:49 -0800
On Feb 25, 9:15 pm, "Edwin Smith" <smithgold...@xxxxxxx> wrote:
I have a form which displays a DataGridView table generated with the VS2005
tools. The database is a Pervasive v.9 with an ODBC driver.
The DataGridView works great except when I'm done and I click the X to close
the form the .exe refuses to die and has to be killed in Task manager.
I ran a debug trace and it seems to work fine. I dropped a CLOSE button onto
the form and put "this.Close();" in for it's event but I get the same
result.
Using trial/error troubleshooting seems to point to some of the generated
code behind the TableAdapter. If I comment it out the form closes properly
but then of course my DataGridView doesn't work.
Anyone have a similar problem?
I'm also having a VS2005 lockup problem (on another thread) which may or may
not be related.
My next step is to start over from scratch since it's fairly easy to rebuild
once I have screenshots of my queries etc...
This sounds like a background thread that isn't marked "background".
The application shuts down only when all foreground threads have
stopped executing. If your code starts a background thread to do some
long-running task (like fetching data from a database) and doesn't
mark the thread "IsBackground", then the thread will keep your
application alive.
You'll have to find the code that starts the background thread and
ensure that the thread's IsBackground property is set to true.
.
- Follow-Ups:
- Re: Process won't die when form is closed.
- From: Edwin Smith
- Re: Process won't die when form is closed.
- From: Edwin Smith
- Re: Process won't die when form is closed.
- References:
- Process won't die when form is closed.
- From: Edwin Smith
- Process won't die when form is closed.
- Prev by Date: Re: static member function, with no public/private/etc.
- Next by Date: Re: Help with cross-thread UI functionality...
- Previous by thread: Re: Process won't die when form is closed.
- Next by thread: Re: Process won't die when form is closed.
- Index(es):