Skip to main content

Windows Forms Application Life Cycle

  • 2 minutes to read

The table in this topic details the steps performed while an XAF Windows Forms application is running.

Stage Description Ways to Customize
Application is created See Windows Forms Application Creation and Initialization.  
Splash screen is invoked The ISplash.Start method of the ISplash object assigned to the WinApplication.SplashScreen method is called. This method shows the splash screen form. See Splash Forms.
An end-user is authenticated See User Authentication using a Logon Window in Windows Forms Applications and User Authentication Without a Logon Window in Windows Forms Applications. See Customize Standard Authentication Behavior and Supply Additional Logon Parameters (Blazor).
Start-up Popup Window Show Actions are executed A collection of Popup Window Show Actions is populated by the Actions that are registered as start-up Actions in modules used by the application. For instance, the ChangePasswordOnLogon represents a start-up Action. A pop-up window is displayed for each Action after an end-user has executed or canceled the previous Action. To register an Action as a start-up, override the GetStartupActions method in your module class. Return a list of Popup Window Show Actions in this method.
Main window is shown The application object asks its Show View Strategy (see ShowViewStrategyBase) to show a main window. Since, at this moment, the Show View Strategy is requested for the first time, it has not yet been created. So, an instance of the ShowInMultipleWindowsStrategy class is created, and then its ShowStartupWindow method is called. (See Show the Main Window in Windows Forms Applications.)  
Splash screen is closed A splash screen is closed by the ISplash.Stop method.  
Main window is displayed until a user closes it A user can close the main window by executing the Exit or LogOff Action. The Exit Action closes the application. The LogOff Action closes the main form and re-invokes the logon form.