Dim sAppName As String = Process.GetCurrentProcess.ProcessName
Dim Procs() As Process
Dim proc As Process
Procs = Process.GetProcesses()
Dim count As Integer = 0
For Each proc In Procs
If proc.ProcessName.ToString.Equals("程式名稱") Then
count += 1
End If
Next proc
If count > 1 Then
Application.Exit()
Else
Application.Run(New 程式名稱())
End If
沒有留言:
張貼留言