[Function] <integer> MessageBox (<string> Text, <string> Title, <integer> nType, MessageBoxIcon );
[Function description] A message box is displayed.
[Syntax]
Parameters:
Text <string>, the body of the message box;
Title <string>: the Title of the message box;
NType <integer> is the type of the message box.
Return Value: <integer>. In the message box, click the button selected when the message is closed.
MessageBoxIcon: the icon style displayed in the dialog box.
[Description]
MessageBox ("message content", "Return Value Confirmation 1", MessageBoxButtons. OK, MessageBoxIcon. Question );
MessageBox ("message content", "Return Value Confirmation 1 cancel 2", MessageBoxButtons. OKCancel, MessageBoxIcon. Asterisk );
MessageBox ("message content", "Return Value termination 3 retry 4 ignore 5", MessageBoxButtons. AbortRetryIgnore, MessageBoxIcon. Error );
MessageBox ("message content", "Return Value is 6 No 7 cancel 2", MessageBoxButtons. YesNoCancel, MessageBoxIcon. Exclamation );
MessageBox ("message content", "returned value is 6 No 7", MessageBoxButtons. YesNo, MessageBoxIcon. Hand );
MessageBox ("message content", "Return Value retry 4 cancel 2", MessageBoxButtons. RetryCancel, MessageBoxIcon. Information );
MessageBoxIcon: All icon styles
Messages. Question MessageBoxIcon. Asterisk MessageBoxIcon. Information MessageBoxIcon. Error MessageBoxIcon. Stop MessageBoxIcon. Hand MessageBoxIcon. Exclamation MessageBoxIcon. Warning MessageBoxIcon. None
MessageBox function MessageBox () function MessageBox is a standard windows Api function that can only be used in the inheritance class of the CWnd class. When used in C, the show method of MessageBox is usually used to pop up the dialog box. The namespace is System. windows. forms
Application instance: