Okay so i had this code in my library for some time now.
So i'm going to share with you.
Rate if you like it
VB.net Code:
Imports System.Threading Public Class Form1 Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim Mutex_Object As Mutex 'We will be working with Mutex Mutex_Object = New Mutex(False, "Pervent Twice Open") ' Were you see "Pervent Twice Open" thats were you put the name of your project. If Mutex_Object.WaitOne(0, False) = False Then 'lets perform the check MessageBox.Show("The same application is opened twice.") Application.Exit() End If End Sub End Class
P.s
I have no idea were i found this code.





Reply With Quote