Page Stats
Visitor: 200
The System.Windows.Forms.MessageBox is a static class that is used to show message boxes for prompting, confirmation and warning users.
MessageBox.Show("Hello World!");
MessageBox.Show("Hello World!", "A Message");
MessageBox.Show("Hello World","A Message", MessageBoxButtons.OKCancel);
The table below shows the members of the MessageBoxButtons enumeration.
AbortRetryIgnore
OK
OKCancel
RetryCancel
YesNo
YesNoCancel
MessageBox.Show("Hello World!", "A Message", MessageBoxButtons.OK, //* MessageBoxIcon.Information);
Asterisk
Information - Used when showing information to the user.
Error Hand Stop - Used when showing error messages.
Exclamation
Warning - Used when showing warning messages.
Question - Used when asking a question to the user.
None - For no Icon
MessageBox.Show("Hello World!", "A Message", MessageBoxButtons.OKCancel,MessageBoxDefaultButton.Button1);