Dim appName As String = Process.GetCurrentProcess.ProcessName
Dim sameProcessTotal As Integer = Process.GetProcessesByName(appName).Length
If sameProcessTotal > 1 Then
MessageBox.Show("A previous instance of this application is already open!", " App.PreInstance Detected!", MessageBoxButtons.OK, MessageBoxIcon.Information)
Me.Close()
End If
appName = Nothing
sameProcessTotal = Nothing
发表于 @ 2008年07月09日 17:44:00 | 评论( loading... ) | 举报| 收藏