using
System;
using
System.Collections.Generic;
using
System.ComponentModel;
using
System.Data;
using
System.Drawing;
using
System.Linq;
using
System.Text;
using
System.Windows.Forms;
namespace
WindowsFormsApplication5
{
public
partial
class
Test : Form
{
public
Test()
{
InitializeComponent();
}
private
void
button1_Click(
object
sender, EventArgs e)
{
if
(MessageBox.Show(
"Confirm Exit Program ??"
,
"Dialog Box Confirm"
, MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == DialogResult.OK)
{
MessageBox.Show(
"You Click OK"
);
Application.Exit();
}
else
{
MessageBox.Show(
"You Click Cancel"
);
}
}
}
}