由网友(揽不住要走的风)分享简介:好了,所以我创建了我的C#应用程序,创建了一个安装程序,并有工作我的机器安装。Okay, so i've created my c# application, created an installer for it and have it working installed on my machine.的问题是...
好了,所以我创建了我的C#应用程序,创建了一个安装程序,并有工作我的机器安装。
Okay, so i've created my c# application, created an installer for it and have it working installed on my machine.
的问题是,当用户打开应用程序的exe两次,会有运行的应用的两个实例。我只希望应用程序的一个实例,以在任何时间运行,我怎么去这样做?
The problem is, when the user opens the application exe twice, there will be two instances of the application running. I only ever want one instance of the application to be running at any time, how do I go about doing this?
感谢您的帮助,
推荐答案
的常用技术,这将是创建一个名为互斥
,并检查它的presence在应用程序启动。
The common technique for this will be to create a named Mutex
and check for its' presence on application start.
请参阅这个或的这个或这个。
相关推荐
最新文章