using System;
using System.Windows.Forms;
public class MainClass {
public static void Main() {
switch (MessageBox.Show("Do you want to create a new file?",
"WonderWord",
MessageBoxButtons.YesNoCancel,
MessageBoxIcon.Question)) {
case DialogResult.Yes:
// "Yes" processing
break;
case DialogResult.No:
// "No" processing
break;
case DialogResult.Cancel:
// "Cancel" processing
break;
}
}
}
|