I got a problem, I use this for making the application a singel instance app
Public Shared Sub Main(ByVal args As String())
Dim RunningProcesses As Process() = Process.GetProcessesByName("TestApp")
If (RunningProcesses.Length = 0) Then
But if I Do this from another application
Dim myProcess As Process = New Process()
myProcess.StartInfo.FileName = applicationPath & "TestApp.exe"
I then get a problem, when the GetProcessesByName methods is executed the process will already be up and running and the applcaition will not start as it should.
so any tips how to fix this?