Compartilhar via


Como: Especificar o comportamento de desligamento de um aplicativo (Visual Basic)

ObservaçãoObservaçã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

  1. Com um projeto selecionado no Solution Explorerdiante do projeto menu, clique em Propriedades.

  2. Click the Application tab.

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

Consulte também

Referência

Instrução End

Exit

Outros recursos

Gerenciando propriedades Application