忆龙2009:windows mobile防止程序重复运行
2010-03-24 01:50
288 查看
以下C#代码,可以实现windows mobile防止程序重复运行:
class Program
{ /// <summary>
/// 应用程序的主入口点。
/// </summary>
[MTAThread]
static void Main()
{
bool createdNew;
Mutex mutex = new Mutex(true);
createdNew = mutex.WaitOne(0, false);
if (createdNew)
{
//Application.EnableVisualStyles();
//Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new frm_MainMenu());
mutex.ReleaseMutex();
}
} } }
class Program
{ /// <summary>
/// 应用程序的主入口点。
/// </summary>
[MTAThread]
static void Main()
{
bool createdNew;
Mutex mutex = new Mutex(true);
createdNew = mutex.WaitOne(0, false);
if (createdNew)
{
//Application.EnableVisualStyles();
//Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new frm_MainMenu());
mutex.ReleaseMutex();
}
} } }
相关文章推荐
- 忆龙2009:windows mobile防止程序重复运行
- vc 禁止程序同时运行多份(防止重复运行)
- vc防止运行多个程序,重复运行,同一个程序
- winform程序防止重复运行
- vc防止运行多个程序,重复运行,同一个程序
- C# .net防止一个程序(WinForm)重复运行的方法。
- C# .net防止一个程序(WinForm)重复运行的方法。
- Winform防止程序重复运行
- vc++ 防止程序重复运行
- windows内核编程之如何防止一个相同的程序重复运行
- Vb.Net防止同一程序重复运行的方法
- 防止程序重复运行
- QT之防止程序重复运行方法
- #pragma data_seg 实现防止程序重复运行
- WinForm防止程序重复运行的方法分析
- 防止重复运行程序并且激活当前正在运行的窗口
- [转]防止程序重复运行,显示原来的窗口
- VC++防止重复运行同一个程序
- C#防止程序重复运行
- 防止重复运行程序并且激活当前正在运行的窗口