标签:
string moduleName = Process.GetCurrentProcess().MainModule.ModuleName; string prcessName = System.IO.Path.GetFileNameWithoutExtension(moduleName); Process[] processes = Process.GetProcessesByName(prcessName); if (processes.Length>1) { MessageBox.Show("程序已经运行!"); Process.GetCurrentProcess().Kill(); }
标签:
原文地址:http://www.cnblogs.com/xinzheng/p/4541310.html