Export (0) Print
Expand All

How to: Specify Instancing Behavior for an Application 

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.

See Also

Community Additions

ADD
Show:
© 2014 Microsoft