WinForm messagebox 确定取消按钮事件
private void button2_Click(object sender, EventArgs e)
{
MessageBox.Show("ABC",MessageBoxButtons.OKCancel);
}
if(DialogResult.OK==MessageBox.Show("ABC",MessageBoxButtons.OKCancel))
{
//点击了OK
}
else
{
//点击了Cancel
}