Hi,
Here you go:
protected override void OnClosing(CancelEventArgs e)
{
DialogResult result = MessageBox.Show("Really close?", "Confirm exit",
MessageBoxButtons.OKCancel);
e.Cancel = result == DialogResult.Cancel;
}
HTH,
Billy
"Raed Sawalha" <Ra*********@discussions.microsoft.com> wrote in message
news:B5**********************************@microsof t.com...
i have form i need when user Close the form a messagebox confirm him with
Yes or No if yes exist if no stay....how can i achieve this?