MessageBox - method of object Pm

Displays the message box and waits for the user's clicking the button. Returns a value corresponding to the pressed button.
MessageBox(sTitle As String, sText As String, [nStyle As Long]) As Long
n = Pm.MessageBox(sTitle, sText, nStyle)
sTitle(String) String displayed in the message box title
sText(String) Text that is displayed in the message box. If the text has to be made out of more lines, the vbCr, vbLf or vbCrLf constants can be used as separators.
nStyle[optional] (Long) Sum of constants corresponding to the buttons, the window style, the default button and the way of application behavior.
&H0 (default) - Display only the OK button
&H1 - Display the OK and Cancel buttons
&H2 - Display the ABORT, RETRY and IGNORE buttons
&H3 - Display the YES, NO and Cancel buttons
&H4 - Display the YES and NO buttons
&H5 - Display the RETRY and Cancel buttons
&H10 - Display the "Critical Message" icon
&H20 - Display the "Warning Query" icon
&H30 - Display the "Warning Message" icon
&H40 - Display the "Information Message" icon
&H0 - The first button is the default
&H100 - The second button is the default
&H200 - The third button is the default
&H300 - The fourth button is the default
&H0 - Application modal mode. If the user wants to continue in the current application activities, he must respond to the message box.
&H10000 - System modal mode. All applications are suspended until the user responds to the message box.
&H10000000 - The window will be "Always on top" over normal windows.
Return Values:
Returns a value corresponding to the pressed button. The values correspond to the following constants:
vbOK - OK button was clicked
vbCancel - Cancel button was clicked
vbAbort - ABORT button was clicked.
vbRetry - RETRY button was clicked.
vbIgnore - IGNORE button was clicked.
vbYes - YES button was clicked.
vbNo - NO button was clicked.
The Pm.InputBox method enables also to display required text and unlike to the MessageBox method the window position can be entered.
The method can also be called in the graphic item events for Web Panels. So far the nStyle parameter is not functional for web.
Displays the message box with a multiline text and with two buttons OK, Cancel
Dim ret, sText
sText = "I must do at home:"
sText = sText & vbCrLf & " 1) Wash the dishes"
sText = sText & vbCrLf & " 2) Clean up"
ret = Pm.MessageBox("Title", sText, &H0+&H10000000)
If ret = vbOK Then
  ' When the OK button has been pressed...
End If
- Pm
- Abs
- Cos
- E
- Exp
- LN2
- MessageBox
- PI
- Pow
- Sin
- Tan
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice