Das nachfolgenden vb-Snippet verhindert den Mehrfachstart einer Anwendung per Code
Dim RunningProcesses As Process() = Process.GetProcessesByName(Process.GetCurrentProcess.ProcessName)
If (RunningProcesses.Length > 1) Then
MessageBox.Show("Another Application is Already Running!", "Security Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
gc.collect
End
End If
1 Kommentare zum Snippet