Startup and Shutdown
- Updated2025-07-23
- 1 minute(s) read
As a final step in the initialization of the application, call the ApplicationMgr.Start method to initialize the Application Manager control and launch the LoginLogout Front-End callback sequence if you did not set the ApplicationMgr.LoginOnStart property to False.
Complete the following steps to shut down the application.
- When the application holds any references to TestStand objects, such as sequence files or executions, handle the ApplicationMgr.QueryShutdown event by canceling the shutdown process or releasing the TestStand object references the application holds.
- Call the ApplicationMgr.Shutdown method. When the method returns True, exit the application. When the method returns False, do not exit the application. Leaving the application running allows the method to shut down any running executions and unload sequence files. When the shut down process completes, TestStand User Interface (UI) Controls the Application Manager control generates the ApplicationMgr.ExitApplication event to notify you to exit the application. If the application cancels the shutdown process, the Application Manager control generates the ApplicationMgr.ShutDownCancelled event, which occurs when users choose not to terminate a busy execution. Note When you use the TestStand User Interface (UI) Controls to create an Exit button or an Exit menu option that invokes the Exit command, the button or menu option automatically calls the ApplicationMgr.Shutdown method for you.
- Exit the application in the event handler you create for the ApplicationMgr.ExitApplication event. The window in which the Application Manager control resides must exist until you receive the ApplicationMgr.ExitApplication event.