DialogsConfirmMessage(IWin32Window, String, String, Boolean) Method

Shows a confirmation message dialog with Yes and No buttons.
See the Remarks section of the ConfirmMessage(String) overload for more details.

Definition

Namespace: KGySoft.WinForms.Forms
Assembly: KGySoft.WinForms (in KGySoft.WinForms.dll) Version: 5.0.1
C#
public static bool ConfirmMessage(
	IWin32Window? owner,
	string message,
	string? caption = null,
	bool isYesDefault = true
)

Parameters

owner  IWin32Window
An optional window that will own the modal message dialog. If , the DialogsOwner property will be taken. If DialogsOwner is also , the currently active window will be used.
message  String
The message to display in the confirmation dialog.
caption  String  (Optional)
The caption of the dialog. If , a localized string similar to Confirmation will be used. This parameter is optional.
Default value: .
isYesDefault  Boolean  (Optional)
if the Yes button should be the default button, if No should be the default. This parameter is optional.
Default value: .

Return Value

Boolean
if the user clicked Yes, if No was clicked or the dialog was closed.

See Also