Application Exit

  • Thread starter Thread starter Beebs
  • Start date Start date
B

Beebs

I know I've seen this asked a hundred times, and I've searched all the
google archives, yet I still can't find a clear cut answer which makes
it easy to understand for the beginner. I need to know the best way
to exit my application (my forms are using the singleton method) from
the "Exit" command on my menus which appears on each form. Right now
this is all I'm doing:

Me.Dispose()
Application.Exit()

and my client keeps complaining that the application freezes up on him
and he has to do a soft reboot...what can I do for each exit menu code
that will allow my application to close nicely. Please be simple yet
thorough in you explanation and any snippets are welcome.

Thanks
 
1. Signal any spawned worker threads to stop
2. Close the main Form (whichever was used in Application.Run)

--
Chris Tacke
Co-founder
OpenNETCF.org
Has OpenNETCF helped you? Consider donating to support us!
http://www.opennetcf.org/donate
 
That's the part I don't get...the whole application.run thing since
that's not how mine is started. I have a Sub Main() in my main module
(VB .NET) and I call my startup form as such:

frmStartup.Instance().ShowDialog()

So is this the form I close then, or should I be starting my app
differently?
 
So your entire app in a Dialog instance? Odd.

At any rate it would be this then:

1. Exit all threads
2. Close Dialog form
3. In Sub Main, after the ShowDialog call, call frmStartup.Dispose()



--
Chris Tacke
Co-founder
OpenNETCF.org
Has OpenNETCF helped you? Consider donating to support us!
http://www.opennetcf.org/donate
 
As you can see I'm rather inexperienced at this stuff, so if you could
tell me the best way to start up my app, I'd appreciate it, maybe
that's part of the reason my client says it's freezing up when he goes
to exit, I don't know...
 
Back
Top