C # Use of the dialog box

Source: Internet
Author: User

[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:

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.