Return to Snippet

Revision: 38416
at January 1, 2011 17:24 by indra


Initial Code
Public Function CheckInstanceOfApp() As Boolean
        Dim appProc() As Process


        Dim strModName, strProcName As String
        strModName = Process.GetCurrentProcess.MainModule.ModuleName
        strProcName = System.IO.Path.GetFileNameWithoutExtension(strModName)

        appProc = Process.GetProcessesByName(strProcName)

        If appProc.Length > 1 Then
            Return False
        End If

        Return True

    End Function

Initial URL


Initial Description


Initial Title
Run just one instance application

Initial Tags


Initial Language
VB.NET