C# Programming
06-24-2013, 06:16 PM
hi
i have a program in c# that when i press button exit it appears
a message box that tell you if you want to exit from the program or not.
But if you press No the program make exit.
private void btnLogout_Click(object sender, EventArgs e)
{
if (MessageBox.Show("are you sure?you want to exit?;","", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
{
Application.Exit();
}
}
i have a program in c# that when i press button exit it appears
a message box that tell you if you want to exit from the program or not.
But if you press No the program make exit.
private void btnLogout_Click(object sender, EventArgs e)
{
if (MessageBox.Show("are you sure?you want to exit?;","", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
{
Application.Exit();
}
}