在PB中messagebox()中最后一个参数是默认值,那这默认值具体是什么意思

来源:学生作业帮助网 编辑:作业帮 时间:2024/04/27 02:30:57
在PB中messagebox()中最后一个参数是默认值,那这默认值具体是什么意思

在PB中messagebox()中最后一个参数是默认值,那这默认值具体是什么意思
在PB中messagebox()中最后一个参数是默认值,那这默认值具体是什么意思

在PB中messagebox()中最后一个参数是默认值,那这默认值具体是什么意思
这句话的default吧
MessageBox ( title, text {, icon {, button {, default } } } )
因为messagebox提示有多种button按钮组合,如果是多个按钮他默认选择按钮为序号1的,如果你要改变可以填写这个数字
譬如:
MessageBox("Result","xxxxx",&
Exclamation!, OKCancel!, 2) 这里的2就是弹出提示框指定选中cancel按钮
如果想弹出选中OK,数字可以不写,也可以写1
一下为HELP里内容
Description
Displays a system MessageBox with the title, text, icon, and buttons you specify.
Syntax
MessageBox ( title, text {, icon {, button {, default } } } )
ArgumentDescription
titleA string specifying the title of the message box, which appears in the box's title bar
textThe text you want to display in the message box. The text can be a numeric data type, a string, or a boolean value
icon (optional)A value of the Icon enumerated data type indicating the icon you want to display on the left side of the message box. Values are:?Information! (Default)?StopSign!?Exclamation!?Question!?None!
button (optional)A value of the Button enumerated data type indicating the set of CommandButtons you want to display at the bottom of the message box. The buttons are numbered in the order listed in the enumerated data type. Values are:?OK! ?(Default) OK button?OKCancel! ?OK and Cancel buttons?YesNo! ?Yes and No buttons?YesNoCancel! ?Yes, No, and Cancel buttons?RetryCancel! ?Retry and Cancel buttons?AbortRetryIgnore! ?Abort, Retry, and Ignore buttons
default (optional)The number of the button you want to be the default button. The default is 1. If you specify a number larger than the number of buttons displayed, MessageBox uses the default