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.
>