Aracılığıyla paylaş


How to: Specify Shutdown Behavior for an Application (Visual Basic)

Not

This topic applies only to Visual Basic projects.

The Shutdown mode property for a Windows Application project determines the shutdown behavior for the application. When set to When startup form closes (the default), the application ends, when the form set as the Startup object closes, even if other forms are open. When set to When last form closes, the application ends when the last form is closed or when Exit or the End statement is called explicitly.

The Shutdown mode property can be set on the Application page of the Project Designer.

To change shutdown behavior

  1. With a project selected in Solution Explorer, on the Project menu, click Properties.

  2. Click the Application tab.

  3. In the Shutdown mode drop-down list, select either When startup form closes or When last form closes.

See Also

Reference

End Statement

Exit

Other Resources

Managing Application Properties