Como: Especificar o comportamento de desligamento de um aplicativo (Visual Basic)
Observação |
---|
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
Com um projeto selecionado no Solution Explorerdiante do projeto menu, clique em Propriedades.
Click the Application tab.
In the Shutdown mode drop-down list, select either When startup form closes or When last form closes.