應用程式避免執行多個實體

若已執行則不再執行
private void Form1_Load(object sender, EventArgs e) {
if (Process.GetProcessesByName(Process.GetCurrentProcess().ProcessName).Length > 1) Application.Exit();
}

留言

熱門文章