I'm having trouble making a dialog with MessageBox with a text like "Do you want to save chanes to Untitled?" with 3 buttons like "save","don't save" and "cancel" ?
private void MenuItemNew()
{
if (textBox.Text == "")
{
textBox.Text = String.Empty;
}
else
DialogResult result3 = MessageBox.Show("Do you want to save changes to Untitled?",
"The Question",
MessageBoxButtons.YesNoCancel,
MessageBoxIcon.Question,
MessageBoxDefaultButton.Button1);
if (result3 == DialogResult.Yes)
{
//statements if Result = Yes
}
else if (result3 == DialogResult.No)
{
//statements if Result = NO
}
i tried this but its not working