SetResult Method (MessageBoxResult)

Sets the DialogResult of the associated MessageBox.

Type: MessageBoxEventArgs

Namespace: XJTAG.Integration.XJRunner

Syntax

public void SetResult(MessageBoxResult result)

Parameters

result

Type: MessageBoxResult

The result to set.

Exceptions

System.ArgumentException

The specified result does not match the available message box options defined by AvailableResults.

Remarks

Calling this method causes the messagebox to close and return the provided result.

You can call SetResult synchronously inside the event handler, or preserve the supplied MessageBoxEventArgs reference and call SetResult later. The message box will close when a user selects one of its buttons, or when SetResult is called, whichever happens first.