以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  如何限制程序重复启动  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=78841)

--  作者:ycli368
--  发布时间:2015/12/18 10:20:00
--  如何限制程序重复启动
如何限制程序重复启动,当有一个进程在运行时,不可重复启动
--  作者:大红袍
--  发布时间:2015/12/18 10:23:00
--  

BeforeOpenProject事件:

 

Static mu As Object

Dim sucess As Boolean = False
mu = new System.Threading.Mutex(True, "dsdfhdfghf", sucess)
If not sucess Then
    MessageBox.Show("只能打开一次!")
    e.Cancel = True
End If