标签:icon 结果 efault enable ble false main ons alt
在“Program.cs”中添加以下代码:
[STAThread] static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); bool blnIsRunning; Mutex mutexApp = new Mutex(false, Assembly.GetExecutingAssembly().FullName, out blnIsRunning); if (!blnIsRunning) { MessageBox.Show("Is Running!", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); return; } Application.Run(new Form1()); }
测试结果:
标签:icon 结果 efault enable ble false main ons alt
原文地址:https://www.cnblogs.com/jizhiqiliao/p/10768085.html