-1

Hey everybody I'm a relatively new programmer and I'm running into an issues. I need to a confirmation dialogue box pop up when you click on a button. I have been doing some digging around on this site but I haven't found anything that has seemed to help?

1 Answers1

0
// Simple MsgBox:
MessageBox.Show("Lorem Ipsum");

// Advanced MsgBox with custom buttons
MessageBox.Show("Lorem Ipsum", "Titel", MessageBoxButtons.OKCancel);
MessageBox.Show("Lorem Ipsum", "Titel", MessageBoxButtons.YesNoCancel);

// Advanced MsgBox with custom buttons and icon
MessageBox.Show("Lorem Ipsum", "Titel", MessageBoxButtons.YesNoCancel, 
                                                     MessageBoxIcon.Information);

// Check for a DialogResult
if (MessageBox.Show("Lorem Ipsum", "Titel",
                          MessageBoxButtons.YesNo, 
                          MessageBoxIcon.Information) == DialogResult.Yes)
{
     // Do stuff
}

See: https://msdn.microsoft.com/en-us/library/system.windows.forms.messagebox.show(v=vs.110).aspx

random314
  • 63
  • 9