using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace MsHtmlDemo
{
static class Program
{
/// <summary>
/// 应用程序的主入口点。
/// </summary>
[STAThread]
static void Main()
{
bool creatednew = false;
using (Mutex mutex = new Mutex(true, Application.ProductName, out creatednew))
{
if (creatednew)
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());
}
else
{
MessageBox.Show("程序已运行",Application.ProductName);
Environment.Exit(1);
}
}
}
}
}
c# 只允许一个程序允许
最新推荐文章于 2024-09-29 08:21:05 发布
336

被折叠的 条评论
为什么被折叠?



