Visual Basic.NET 7.x (2002/03)Visual Studio .NET 2002Visual Basic 9 (2008)Visual Basic 8 (2005)QASQL Server 2000Visual C++ 7.1Visual C++ 8.0.NET 1.0Visual Studio .NET 2003Visual Basic 6Visual Studio 2008.NET 1.1Visual Studio 2005.NET 2.0CSSSQL Server 2005BeginnerVisual StudioSQL ServerC++.NETVisual Basic
Single Instance Application A Simple Way!






1.71/5 (13 votes)
Making Single Instance Application a Simple Way!!
Introduction
This is a Simple method to make a Application Singleton.
Background
I had seen some Examples on Codeproject but those were a little complex this is the simple method.
Using the code
It is very simple to understand the programming i have done in this example.
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load If Process.GetProcessesByName(Process.GetCurrentProcess.ProcessName).Length() > 1 Then MsgBox("This is a Single instance Applicaton " & vbNewLine & "* Another Instance is Already Running", MsgBoxStyle.OKOnly, "Single Instance Application") End End If End Sub