Rob van der Woude's Scripting Pages

Help text for dialogboxes

(view help text of dialogboxes as plain text)

Help for MessageBox class
──────────────────────────

Present a message dialog, and return the caption of the button clicked


COM ProgID: RobvanderWoude.MessageBox


┌──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│                                                                                                                                              │
│ Properties        (Note that all properties are string or integer, no booleans, objects or arrays)                                           │
│                                                                                                                                              │
╞══════════════════════╤════════════════════════════════════════════════════╤═══════════╤═══════════╤══════════════════════════════════════════╡
│ Property Name        │ Description                                        │ Mandatory │ Read-Only │ Default (Allowed) Values                 │
╞══════════════════════╪════════════════════════════════════════════════════╪═══════════╪═══════════╪══════════════════════════════════════════╡
│ buttons              │ The buttons presented in the dialog                │ no        │ no        │ OK (OK, OKCancel, AbortRetryIgnore,      │
│                      │                                                    │           │           │ YesNoCancel, YesNo, RetryCancel)         │
├──────────────────────┼────────────────────────────────────────────────────┼───────────┼───────────┼──────────────────────────────────────────┤
│ buttonclicked        │ The caption of the button that was clicked         │ no        │ no        │                                          │
├──────────────────────┼────────────────────────────────────────────────────┼───────────┼───────────┼──────────────────────────────────────────┤
│ defaultbutton        │ The button that has focus when the dialog opens    │ no        │ no        │ Button1 (Button1, Button2, Button3)      │
├──────────────────────┼────────────────────────────────────────────────────┼───────────┼───────────┼──────────────────────────────────────────┤
│ debuginfo            │ A log of actions for debugging                     │ N/A       │ YES       │                                          │
├──────────────────────┼────────────────────────────────────────────────────┼───────────┼───────────┼──────────────────────────────────────────┤
│ errors               │ List of errors with current settings               │ N/A       │ YES       │                                          │
├──────────────────────┼────────────────────────────────────────────────────┼───────────┼───────────┼──────────────────────────────────────────┤
│ icons                │ The icon in the dialog                             │ no        │ no        │ None (None, Hand, Error, Stop,           │
│                      │                                                    │           │           │ Question, Exclamation, Warning,          │
│                      │                                                    │           │           │ Asterisk, Information)                   │
├──────────────────────┼────────────────────────────────────────────────────┼───────────┼───────────┼──────────────────────────────────────────┤
│ message              │ The message to be displayed in the dialog          │ no        │ no        │                                          │
├──────────────────────┼────────────────────────────────────────────────────┼───────────┼───────────┼──────────────────────────────────────────┤
│ options              │ The options for the dialog                         │ no        │ no        │ DefaultDesktopOnly, ServiceNotification  │
│                      │                                                    │           │           │ (DefaultDesktopOnly, RightAlign,         │
│                      │                                                    │           │           │ RtlReading, ServiceNotification)         │
├──────────────────────┼────────────────────────────────────────────────────┼───────────┼───────────┼──────────────────────────────────────────┤
│ title                │ Dialog window title                                │ no        │ no        │ DialogBoxes.dll,  Version 0.18.1.0       │
├──────────────────────┼────────────────────────────────────────────────────┼───────────┼───────────┼──────────────────────────────────────────┤
│ Version              │ Show this DLL's version                            │ N/A       │ YES       │                                          │
└──────────────────────┴────────────────────────────────────────────────────┴───────────┴───────────┴──────────────────────────────────────────┘


┌──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│                                                                                                                                              │
│ Methods                                                                                                                                      │
│                                                                                                                                              │
╞═══════════════════════╤════════════════════════════════════════════════════════════════════════════╤═════════════════════════════════════════╡
│ Method Name           │ Description                                                                │ Requirements                            │
╞═══════════════════════╪════════════════════════════════════════════════════════════════════════════╪═════════════════════════════════════════╡
│ CheckUpdate           │ Check the developer's website for updates                                  │                                         │
├───────────────────────┼────────────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────┤
│ Credits               │ Shows credits                                                              │                                         │
├───────────────────────┼────────────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────┤
│ Help                  │ Returns this help text as plain text, or if optional parameter equals 1,   │                                         │
│                       │ as html                                                                    │                                         │
├───────────────────────┼────────────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────┤
│ ListMessageBoxButtons │ Return a semicolon-separated list of available buttons                     │                                         │
├───────────────────────┼────────────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────┤
│ ListMessageBoxIcons   │ Return a semicolon-separated list of available icons                       │                                         │
├───────────────────────┼────────────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────┤
│ ListMessageBoxOptions │ Return a semicolon-separated list of available options                     │                                         │
├───────────────────────┼────────────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────┤
│ ListProperties        │ Returns a list of this class' properties as key=value pairs (1 per line)   │                                         │
├───────────────────────┼────────────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────┤
│ SampleCode            │ Returns VBScript sample code for this dialog                               │                                         │
├───────────────────────┼────────────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────┤
│ Show                  │ Presents a message dialog based on the current property values, and saves  │                                         │
│                       │ the caption of the button that is clicked in the "buttonclicked" property. │                                         │
└───────────────────────┴────────────────────────────────────────────────────────────────────────────┴─────────────────────────────────────────┘


VBScript usage example:
───────────────────────

Set objMessageBox = CreateObject( "RobvanderWoude.MessageBox" )

With objMessageBox
	.message = "This MessageBox is more or less obsolete in VBScript," & vbCrLf _
	         & "as it is almost identical to VBScript's own MsgBox," & vbCrLf _
	         & "but it may be useful in other COM-aware scripting languages."
	.title = "MessageBox Demo"
	.buttons = "OK"
	.icon = "Information"
	.Show
	WScript.Echo "You clicked: " & .buttonclicked
	WScript.Echo
	WScript.Echo .ListProperties( )
End With

Set objMessageBox = Nothing

page last uploaded: 2022-10-05; loaded in 0.0217 seconds