Sub main()Sub main() As Integer Dim hMutex As New System.Threading.Mutex(False, Application.ProductName) '没有二次启动 If hMutex.WaitOne(0, False) = True Then ‘TODO Else '二次启动的时候 GC.KeepAlive(hMutex) hMutex.Close() Return ERRORCODE End If End Sub