X
Xenio
Hi,
I'd like to make sure that only one instance of my app is running per User
Session. In addition this has to work with user rights and in a Windows
2k/2k3 and Citrix Terminalserver environment.
The code I'm using prevents the app from creating a second instance on a TS.
What do I have to change?
Dim handler As ThreadExceptionHandler = New ThreadExceptionHandler
AddHandler Application.ThreadException, AddressOf
handler.Application_ThreadException
Dim findProcesses(), thisProcess As Process
thisProcess = Process.GetCurrentProcess()
findProcesses = Process.GetProcessesByName(thisProcess.ProcessName)
If findProcesses.Length = 1 Then
Dim aForm As New myForm
Application.Run(aForm)
End If
Thanks in advance for any hint
Xenio
I'd like to make sure that only one instance of my app is running per User
Session. In addition this has to work with user rights and in a Windows
2k/2k3 and Citrix Terminalserver environment.
The code I'm using prevents the app from creating a second instance on a TS.
What do I have to change?
Dim handler As ThreadExceptionHandler = New ThreadExceptionHandler
AddHandler Application.ThreadException, AddressOf
handler.Application_ThreadException
Dim findProcesses(), thisProcess As Process
thisProcess = Process.GetCurrentProcess()
findProcesses = Process.GetProcessesByName(thisProcess.ProcessName)
If findProcesses.Length = 1 Then
Dim aForm As New myForm
Application.Run(aForm)
End If
Thanks in advance for any hint
Xenio