Table of Contents

Method OnShowMessage

Namespace
Alternet.Common
Assembly
Alternet.Common.Winforms.v10.dll

OnShowMessage(string, IWin32Window?, string?, MessageBoxButtons, MessageBoxIcon, Action<DialogResult>?)

Calls MessageBoxShow event if it is assigned.

protected static bool OnShowMessage(string message, IWin32Window? owner = null, string? caption = null, MessageBoxButtons buttons = MessageBoxButtons.OK, MessageBoxIcon icon = MessageBoxIcon.None, Action<DialogResult>? onClose = null)

Parameters

message string

The text to display in the message box.

owner IWin32Window

An implementation of IWin32Window that will own the message box dialog.

caption string

The text to display in the title bar of the message box.

buttons MessageBoxButtons

One of the MessageBoxButtons values that specifies which buttons to display in the message box.

icon MessageBoxIcon

One of the MessageBoxIcon values that specifies which icon to display in the message box.

onClose Action<DialogResult>

The action which is called when dialog is closed.

Returns

bool

true if message dialog request is handled inside the event and no further processing is required; otherwise false.