Hi ahjiang,
"ah*****@gmail.com" wrote:
Hi all,
I have this messagebox that prompts when a fatal error occurs and i
would like the user to click okie and the whole pgm would exit
Hope this helps,
DialogResult ret = MessageBox.Show("Show", "Exit",MessageBoxButtons.YesNo);
Console.WriteLine(ret.ToString());
if (ret == DialogResult.Yes)
Application.Exit();
else if (ret == DialogResult.No)
MessageBox.Show("Pressed No");
DialogResult stores the button value what is been clicked. With that you can
get all return types.
Regards,
C.C.Chakkaradeep