Check for Previous Instance of an Application (VB.NET)

Category:
C#, VB.NET, ASP.NET
Type:
Snippets
Difficulty:
Beginning
Author:
Intelligent Solutions Inc.

Version Compatibility: Visual Basic.NET

More information:
This VB.NET function will check for an already running instance of the application and end the second instance if the previous instance is present. Call it from your form_load event.

Instructions: Copy the declarations and code below and paste directly into your VB project.

Declarations:

Code: