In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article will explain in detail what the return value type of the msgbox function is. The editor thinks it is very practical, so I share it with you for reference. I hope you can get something after reading this article.
The return value of the MsgBox function is of type "numeric". The function of the MsgBo function is to pop up a dialog box, wait for the user to click the button, and return an Integer integer value indicating which button the user clicked.
The return value of the MsgBox function is of type "numeric".
MsgBox is a function in Visual Basic and VBS.
MsgBox displays messages in a simple dialog box that can include predefined buttons and items, messages, titles, buttons, and items to be used in the dialog box that the user wants to specify. MsgBox can be used to display a message in a dialog box and wait for the user to click the button, and then return an integer value to let the program know which button the user clicked.
"MsgBox" is the abbreviation of "Message Box", which means "mailbox" in English.
Grammar
MsgBox (Prompt [, Buttons] [, Title] [, Helpfile,Context])
Parameters:
Parameters of MsgBox function
Part
Description
Prompt
Must be chosen. String expression, the message displayed in the dialog box. The maximum length of a Prompt is approximately
1024 characters, determined by the byte size of the characters used. If the Prompt contains more than one line, each line can be separated by a carriage return (Chr (13)), a newline character (Chr (10)), or a combination of carriage return and newline characters (Chr (13) & Chr (10), that is, vbCrLf).
Buttons
Optional. Numeric expressions, which are the sum of numeric values, specify the number and form of buttons displayed, the icon style (and sound) used, the default buttons, and the mandatory message box, and so on. If omitted, the default value is 0. For specific values, see the "Parameter setting values" table.
Title
Optional. String expression, what is displayed in the title bar of the dialog box. If Title is omitted, the application title (App.Title) is placed in the title bar.
Helpfile
Optional. A string expression, a help file used to provide context-sensitive help to a dialog box. If Helpfile is provided, Context must also be provided.
Context
Optional. Numeric expression, the help context number assigned to the appropriate help topic by the author of the help file. If Context is provided, Helpfile must also be provided.
Parameter setting value:
Buttons parameter setting value
Constant
Value
Description
The type and number of buttons displayed in the dialog box
VbOKOnly
0
Only the OK button is displayed. (default)
VbOKCancel
one
Displays the OK and cancel buttons.
VbAbortRetryIgnore
two
The stop, retry, and ignore buttons are displayed.
VbYesNoCancel
three
Displays the Yes, No, and cancel buttons.
VbYesNo
four
Displays the Yes and No buttons.
VbRetryCancel
five
The retry and cancel buttons are displayed.
The style of the icon (depending on the system settings, it may be accompanied by sound)
VbCritical
sixteen
Displays the error message icon.
VbQuestion
thirty-two
Displays the ask for Information icon.
VbExclamation
forty-eight
Displays the warning message icon.
VbInformation
sixty-four
Displays the Notification message icon.
Default button
VbDefaultButton1
0
The first button is the default button. (default)
VbDefaultButton2
two hundred and fifty six
The second button is the default button.
VbDefaultButton3
five hundred and twelve
The third button is the default button.
VbDefaultButton4
seven hundred and sixty eight
The fourth button is the default button.
Forced return of dialog box
VbApplicationModal
0
The application forces a return; the application is suspended until the user responds to the message box.
VbSystemModal
4096
The system forces a return; all applications are suspended until the user responds to the message box.
Dialog box special settings
VbMsgBoxHelpButton
16384
Add a help button to the message box.
VbMsgBoxSetForeground
65536
Specify the message box window as the foreground window.
VbMsgBoxRight
524288
The text is right-aligned.
VbMsgBoxRtlReading
1048576
Specifies that the text should be displayed from right to left in Hebrew and Arabic systems.
These constants are specified by Visual Basic for Applications (VBA). Therefore, you can use these constant names in your program code instead of the actual numeric values.
Return value:
The return value of MsgBox function
Constant
Value
Description
VbOK
one
The OK button was clicked.
VbCancel
two
The cancel button was clicked.
VbAbort
three
The stop button was clicked.
VbRetry
four
The retry button was clicked.
VbIgnore
five
The ignore button was clicked.
VbYes
six
The Yes button was clicked.
VbNo
seven
The No button was clicked.
About what the return value type of the msgbox function is shared here, I hope the above content can be of some help to you, you can learn more knowledge. If you think the article is good, you can share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.