Difference between revisions of "ISDBApplication::MessageBox"

From MediaMonkey Wiki
Jump to: navigation, search
(MessageBox buttons constants apparently were completely wrong)
(beautification of parameters.)
Line 5: Line 5:
 
{{MethodParameters  
 
{{MethodParameters  
 
  |MessageText |String |Text to be shown in the message box.
 
  |MessageText |String |Text to be shown in the message box.
  |MsgType |EnumMsgBox |Type of the box, can be one of: mtWarning(0), mtError(1), mtInformation(2), mtConfirmation(3) or mtCustom(4).
+
  |MsgType |EnumMsgBox |Type of the box. Can be one of constants described below.
  |Buttons |Variant |Array of buttons to be shown, can be any of: mbYes(0), mbYesToAll(1), mbNo(2), mbNoToAll(3), mbOk(4), mbOkToAll(5), mbEdit(6), mbEditToAll(7), mbCancel(8), mbAbort(9), mbRetry(10), mbIgnore(11), mbIgnoreToAll(12), mbAll(13), mbHelp(14).}}
+
  |Buttons |Variant |Array of buttons to be shown, can be any constants described below.}}
  
 
===Method description===
 
===Method description===
Line 12: Line 12:
 
Shows a customized message box and returns information about button that was pressed, which can be one of the following values:
 
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).
 
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===                     
 
===Example code===                     

Revision as of 20:44, 20 April 2013

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))