Skip to content

IMessageBoxService.Show method (1 of 2)

Shows a modal message box owned by the active application window.

public DialogResult Show(string text, string caption, MessageBoxButtons buttons, 
    MessageBoxIcon icon)
parameter description
text The message shown in the body of the message box.
caption The window caption.
buttons The set of buttons to offer.
icon The icon shown next to the message.

Return Value

The button the user pressed.

See Also


IMessageBoxService.Show method (2 of 2)

Shows a modal message box owned by the specified window.

public DialogResult Show(IWindow? owner, string text, string caption, MessageBoxButtons buttons, 
    MessageBoxIcon icon)
parameter description
owner The window the message box is shown on top of. When null, the active application window is used.
text The message shown in the body of the message box.
caption The window caption.
buttons The set of buttons to offer.
icon The icon shown next to the message.

Return Value

The button the user pressed.

See Also