Hii,everyonei find the solution here :but i need to pass this code ( class_Exit ex = new class_Exit(); ex.exituni();) to unify the message box that will appear when close by close icon or button closeprotected override void OnFormClosing(FormClosingEventArgs e) { base.OnFormClosing(e); if (e.CloseReason == CloseReason.WindowsShutDown) return; // Confirm user wants to close switch (MessageBox.Show(this, "Are you sure you want to close?", "Closing", MessageBoxButtons.YesNo)) { case DialogResult.No: e.Cancel = true; break; default: break; } } 解决方案 这篇关于我找到了解决方案,但是有一个问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
10-27 23:21