Confirmation Message

c#, messagebox, winforms

Solution

You must know about the `MessageBox Dialog`

if (checkBox1.Checked && (MessageBox.Show("Yes or no", "The Title", 
    MessageBoxButtons.YesNo, MessageBoxIcon.Question, 
    MessageBoxDefaultButton.Button1) == System.Windows.Forms.DialogResult.Yes))
{
    //TODO: Stuff
}

Problem

If a user checks the `Checkbox`, how do I code to show `MessageBox.Show("..."`, with `YesNoCancel` buttons in the message box, and when a user clicks no, another `MessageBox.Show` pops up? My code is this so far and it will not work: ``` private void lipsCheckBox_CheckedChanged(object sender, EventArgs e) { if (lipsCheckBox.Checked = MessageBox.Show("...?", "Want something else?", MessageBoxButtons.YesNoCancel, MessageBox.Show("...?", "Yea, Burt's bees?", MessageBoxButtons.YesNoCancel, MessageBox.Show("...??", "Hell yea LipxMedx?", MessageBoxButtons.YesNoCancel), MessageBoxIcon.Question); } ```

Original source