Closing app from in code

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi

I would like to be able to close the application form inside my either from
a user control or from somewhere else in my code. (the title bar and close
icon have been hidden on the GUI).

What event/code do i use to close the app and ensure everything is cleaned up?

Thanks In Advance
Macca
 
Macca,

You should be able to call the static Exit method on the Application
class. This will send a WM_QUIT message to your app, and it should shut
down normally.

Hope this helps.
 
Back
Top