public partial class frmexit : Form { public frmexit() { InitializeComponent(); } private void btnyes_Click(object sender, EventArgs e) { Application.Exit(); } private void btnno_Click(object sender, EventArgs e) { this.Close(); } }
Application.ExitThread();
private void button1_Click(object sender, EventArgs e) { var msg = MessageBox.Show("Exit", "", MessageBoxButtons.YesNo).ToString(); if (msg == "Yes") Application.Exit(); else return; }
DialogResult a; a = MessageBox.Show("Are you sure to exit.", "Message", MessageBoxButtons.YesNo, MessageBoxIcon.Asterisk); if (a == DialogResult.Yes) { Application.Exit(); } else { this.Close(); }
DialogResult a; a = MessageBox.Show("Are you sure to exit.", "Message", MessageBoxButtons.YesNo, MessageBoxIcon.Asterisk); if (a == DialogResult.Yes) { Form1 frm = new Form1 (); frm.Show(); } else { // Continue }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)