How do I know when Windows tells my program to close?

  • Thread starter Thread starter Kevin White
  • Start date Start date
K

Kevin White

Hi all,

I have a program that has this basic flow:
1- Splash screen opens and creates a system tray icon (the splash
screen is the main form that is started on program execution, and
stays hidden to be the form that the tray icon "belongs to")
2- From the tray icon, multiple forms are opened up for data entry
3- User may or may not exit the program from the system tray icon

If Windows shuts down, how does my program receive notification? Will
Windows try to close my program before the individual forms that were
opened?

Thanks,

Kevin
 
* (e-mail address removed) (Kevin White) scripsit:
I have a program that has this basic flow:
1- Splash screen opens and creates a system tray icon (the splash
screen is the main form that is started on program execution, and
stays hidden to be the form that the tray icon "belongs to")
2- From the tray icon, multiple forms are opened up for data entry
3- User may or may not exit the program from the system tray icon

If Windows shuts down, how does my program receive notification? Will
Windows try to close my program before the individual forms that were
opened?

<http://www.mvps.org/dotnet/dotnet/samples/windowsandforms/downloads/CloseWindow.zip>
 
Back
Top