Displays a message box in the session and returns the user's response to the message box.
Declaring type: ITerminalServicesSession
Namespace: Cassia
Assembly: Cassia
Collapse/Expand Syntax
C#
public abstract RemoteMessageBoxResult MessageBox (
        string text,
        string caption,
        RemoteMessageBoxButtons buttons,
        RemoteMessageBoxIcon icon,
        RemoteMessageBoxDefaultButton defaultButton,
        RemoteMessageBoxOptions options,
        TimeSpan timeout,
        bool synchronous
) 
Parameters
text
The text to display in the message box.
caption
The caption of the message box.
buttons
The buttons to display in the message box.
icon
The icon to display in the message box.
defaultButton
The button that should be selected by default in the message box.
options
Options for the message box.
timeout
The amount of time to wait for a response from the user before closing the message box. The system will wait forever if this is set to TimeSpan.Zero. This will be treated as a integer number of seconds -- specifying TimeSpan.FromSeconds(2.5) will produce the same result as TimeSpan.FromSeconds(2).
synchronous
If true, wait for and return the user's response to the message box. Otherwise, return immediately.
Return Value
The user's response to the message box. If synchronous is false, the method will always return Asynchronous. If the timeout expired before the user responded to the message box, the result will be Timeout.