static class Program
{
private static Mutex onlyOne; [STAThread]
static void Main()
{
onlyOne = new Mutex(true, Process.GetCurrentProcess().ProcessName);
if (onlyOne.WaitOne(0, false))
{
Application.Run(new mainForm());
}
else
{
MessageBox.Show("应用程序已启动!"); ...