PC Review


Reply
Thread Tools Rate Thread

Application wont exit

 
 
Arthur Dent
Guest
Posts: n/a
 
      29th Jun 2006
Hello All,

Im having a problem getting my app to unload from memory. it starts with a
sub main, that essentially goes:

Dim f as myForm
f.ShowDialog()
Application.Exit

now, it IS getting to the application.exit statment (tested with a MsgBox
statement earlier), but it just WONT
unload. It LOOKS like it does, all the forms go away, and if i check the
Running Programs list, it is not listed
anymore, but the terminal just sits there with its little "hourglass" thing
going and going ..... and it maintains a
lock on the executable file.
Very frustrating for development because i have to reset the device before i
can copy on a new version,
which means having to re-establish a stupid activesync connection too.
Rather tedious.

Any idea why it would not exit even though it appears to? VS2005, CF 2

Thanks in advance,
Arthur Dent.


 
Reply With Quote
 
 
 
 
Guest
Posts: n/a
 
      29th Jun 2006
Fist Ill go on record as saying that's not a very good way to exit. To exit
an app you should always try to close the Form instance passed to
Application.Run.

In this case my thought is that your myForm instance is causing grief with
it's own message pump and the process is waiting for it to get cleaned up
before exiting. Forms shown with ShowDialog aren't disposed (by design) when
closed, so try this:

Dim f as myForm
f.ShowDialog()
f.Dispose()
Application.Exit


--
Chris Tacke
OpenNETCF Consulting
www.opennetcf.com
--



"Arthur Dent" <hitchhikersguideto-(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> Hello All,
>
> Im having a problem getting my app to unload from memory. it starts with a
> sub main, that essentially goes:
>
> Dim f as myForm
> f.ShowDialog()
> Application.Exit
>
> now, it IS getting to the application.exit statment (tested with a MsgBox
> statement earlier), but it just WONT
> unload. It LOOKS like it does, all the forms go away, and if i check the
> Running Programs list, it is not listed
> anymore, but the terminal just sits there with its little "hourglass"
> thing going and going ..... and it maintains a
> lock on the executable file.
> Very frustrating for development because i have to reset the device before
> i can copy on a new version,
> which means having to re-establish a stupid activesync connection too.
> Rather tedious.
>
> Any idea why it would not exit even though it appears to? VS2005, CF 2
>
> Thanks in advance,
> Arthur Dent.
>



 
Reply With Quote
 
Arthur Dent
Guest
Posts: n/a
 
      29th Jun 2006
Okay, i fixed it.... you put me on the right track, thanks.
I believe it was the Symbol barcode component which was not automatically
disposing itself.
Did a dispose on that thing and now it works. GREAT,THANKS!


"<ctacke/>" <ctacke[@]opennetcf[dot]com> wrote in message
news:(E-Mail Removed)...
> Fist Ill go on record as saying that's not a very good way to exit. To
> exit an app you should always try to close the Form instance passed to
> Application.Run.
>
> In this case my thought is that your myForm instance is causing grief with
> it's own message pump and the process is waiting for it to get cleaned up
> before exiting. Forms shown with ShowDialog aren't disposed (by design)
> when closed, so try this:
>
> Dim f as myForm
> f.ShowDialog()
> f.Dispose()
> Application.Exit
>
>
> --
> Chris Tacke
> OpenNETCF Consulting
> www.opennetcf.com
> --
>
>
>
> "Arthur Dent" <hitchhikersguideto-(E-Mail Removed)> wrote in message
> news:%(E-Mail Removed)...
>> Hello All,
>>
>> Im having a problem getting my app to unload from memory. it starts with
>> a sub main, that essentially goes:
>>
>> Dim f as myForm
>> f.ShowDialog()
>> Application.Exit
>>
>> now, it IS getting to the application.exit statment (tested with a MsgBox
>> statement earlier), but it just WONT
>> unload. It LOOKS like it does, all the forms go away, and if i check the
>> Running Programs list, it is not listed
>> anymore, but the terminal just sits there with its little "hourglass"
>> thing going and going ..... and it maintains a
>> lock on the executable file.
>> Very frustrating for development because i have to reset the device
>> before i can copy on a new version,
>> which means having to re-establish a stupid activesync connection too.
>> Rather tedious.
>>
>> Any idea why it would not exit even though it appears to? VS2005, CF 2
>>
>> Thanks in advance,
>> Arthur Dent.
>>

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Application.Exit() vs Environmrnt.Exit(0) =?Utf-8?B?VGFvZ2U=?= Microsoft C# .NET 1 19th Apr 2007 04:37 AM
application.exit, application.exitthread exit application problem =?Utf-8?B?TWlrZSBTaWx2ZXI=?= Microsoft Dot NET Framework Forms 2 24th Nov 2004 04:14 AM
Application.exit() vs Environment.exit(-1) vs Application.exitthread() Brendan Miller Microsoft C# .NET 1 5th Feb 2004 09:13 AM
RE: RE: How can I safe exit my application when the user terminates the application from the Control panel? Dolphin White Microsoft Dot NET Compact Framework 0 4th Sep 2003 05:53 AM
How can I safe exit my application when the user terminates the application from the Control panel? Dolphin White Microsoft Dot NET Compact Framework 1 4th Sep 2003 04:47 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:43 PM.