以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  打开项目。  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=14120)

--  作者:bm
--  发布时间:2011/11/8 23:45:00
--  打开项目。

怎样才能在同一台电脑上。禁止打开同一个项目。

 

全局代码:

Public mu As System.Threading.Mutex

 

BeforeOpenProject事件:

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

这个代码好像没什么用啊

[此贴子已经被作者于2011-11-9 0:08:10编辑过]

--  作者:狐狸爸爸
--  发布时间:2011/11/9 8:42:00
--  

我测试有效:

 

 

 下载信息  [文件大小:   下载次数: ]
图片点击可在新窗口打开查看点击浏览该文件:管理项目28.rar