public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
var res = MessageBox.Show("This is a test messagebox!", "Warning", MessageBoxButtons.YesNoCancel);
if (res == DialogResult.Yes)
{ }
else if (res == DialogResult.No)
{ }
else//cancel
{ }
}
}
Download the project of Visual Studio 2013 in DropBox Download