ISDBApplication::MessageBox
Jump to navigation
Jump to search
CoClass SDBApplication, Interface ISDBApplication
Function MessageBox(MessageText As String, MsgType As EnumMsgBox, Buttons) As Long
Parameters
Name | Type | Description |
---|---|---|
MessageText | String | Text to be shown in the message box. |
MsgType | EnumMsgBox | Type of the box. Can be one of constants described below. |
Buttons | Variant | Array of buttons to be shown, can be any constants described below. |
Method description
Shows a customized message box and returns information about button that was pressed, which can be one of the following values: mrNone(0), mrOk(1), mrCancel(2), mrAbort(3), mrRetry(4), mrIgnore(5), mrYes(6), mrNo(7), mrAll(8), mrNoToAll(9), mrYesToAll(10), mrOkToAll(110) or mrIgnoreToAll(111).
MsgType constants:
- 0: mtWarning – Icon with yellow exclamation. Use to present a condition that might cause a problem in the future.
- 1: mtError – Icon with red cross. Use to present an error or problem that has occurred.
- 2: mtInformation – Icon with small letter „i“. Use to present an useful information.
- 3: mtConfirmation – Question mark icon. Use to ask user for input.
- 4: mtCustom – No icon is shown.
Button constants:
- 0: mbYes
- 1: mbYesToAll
- 2: mbNo
- 3: mbNoToAll
- 4: mbOk
- 5: mbOkToAll
- 6: mbEdit
- 7: mbEditToAll
- 8: mbCancel
- 9: mbAbort
- 10: mbRetry
- 11: mbIgnore
- 12: mbIgnoreToAll
- 13: mbAll
- 14: mbHelp
Example code
res = SDB.MessageBox( SDB.Localize("Select tracks to be exported, please."), mtError, Array(mbOk))
JScript note
Passed array of buttons must be of special VBSafeArray. Read more about in Tips & Tricks – JScript section.