tumblr tracker

ShowWarning

Parent Previous Next

MessageBox.ShowWarning


Namespace: MessageBox


Shows a standard Windows warning message box containing a message, title and button(s).


retval = MessageBox.ShowWarning(Message, [Title], [Buttons])


Parameters:

- Message; the message text; string constant or variable or function returning a string;


- [Title]; optional parameter; Title for the message box; string constant or variable or function returning a string;


- [Buttons]; optional parameter; the buttons to display; Moscripto global constant, any of the following:


       BUTTONS_OK - shows only the OK button


       BUTTONS_OK_CANCEL - shows OK and Cancel buttons


       BUTTONS_YES_NO - shows Yes and No buttons


       BUTTONS_YES_NO_CANCEL - shows Yes, No and Cancel buttons


Returns:

Moscripto global constant specifying the button that was clicked. Any of the following:


       BTN_OK - OK button was clicked

       BTN_CANCEL - Cancel button was clicked

       BTN_YES - Yes button was clicked

       BTN_NO - No button was clicked


Example


$ret = MessageBox.ShowWarning("This is my warning!", "Warning", BUTTONS_YES_NO_CANCEL);

if ($ret == BTN_YES)
{
   MessageBox.ShowInfo("Yes was selected.");
}
ElseIf ($ret == BTN_NO)
{
   MessageBox.ShowInfo("No was selected.");
}
Else
{
   MessageBox.ShowInfo("Cancel was selected.");
}


The above code will display the following message box: