Method OnShowMessage
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
messagestringThe text to display in the message box.
ownerIWin32WindowAn implementation of IWin32Window that will own the message box dialog.
captionstringThe text to display in the title bar of the message box.
buttonsMessageBoxButtonsOne of the MessageBoxButtons values that specifies which buttons to display in the message box.
iconMessageBoxIconOne of the MessageBoxIcon values that specifies which icon to display in the message box.
onCloseAction<DialogResult>The action which is called when dialog is closed.
Returns
- bool
trueif message dialog request is handled inside the event and no further processing is required; otherwisefalse.