怎样才能在同一台电脑上。禁止打开同一个项目。
全局代码:
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编辑过]