How to: Specify Instancing Behavior for an Appl...
Visual Studio
How to: Specify Instancing Behavior for an Application (Visual Basic)

NoteNote:

This topic applies only to Visual Basic projects.

Applications created with Visual Basic are multiple-instance applications by default; users can launch multiple instances of the compiled application. In some cases, you may want to prevent users from launching multiple instances of your application. This can be done by setting the Make Single Instance Application property for your project, accessible from the Application page of the Project Designer.

When the Make Single Instance Application check box is selected, only a single instance of the compiled application is allowed. If a user tries to launch a second instance, focus is shifted to the instance that is already running, and its StartupNextInstance event is raised.

To create a single-instance application

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

  2. Click the Application tab.

  3. Select the Make single instance application check box.

To create a multiple instance application

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

  2. Click the Application tab.

  3. Clear the Make single instance application check box.

    NoteNote:

    Applications are multiple instances by default.

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
Page view tracker