Question : "Make Single Instance Application" Not Avaliable ???

This property is disabled in the app's property dialog box (see image). It is a Windows Form Application in VB.NET and all I need is to set this property. All that is on the internet are code snippets that don't work in my app.

I have not idea why this is not available. Does anyone know how to enable this?

Thank you.

--Bob
Attachments:
 
C:\DOCUME~1\ROBERT~1.CAN\Desktop\GDMPRO~1.JPG
C:\DOCUME~1\ROBERT~1.CAN\Desktop\GDMPRO~1.JPG
 

Answer : "Make Single Instance Application" Not Avaliable ???

Correction on Mutex method (forgot the GC.KeepAlive)...
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
Imports System.Threading
Module Module1
    Dim mutexOk As Boolean
    Dim m As Mutex
    Sub Main()
        m = New Mutex(True, "MyMutexName", mutexOk)
        If Not mutexOk Then
            MsgBox("Another instance already running, quitting this one.")
            Return
        End If

        MsgBox("First Instance")

        GC.KeepAlive(m)
    End Sub

End Module
Random Solutions  
 
programming4us programming4us