WizardPage.ShowMessage Method (String, MessageBoxButtons, MessageBoxIcon, MessageBoxDefaultButton)

 

Displays a message box that uses the specified text, button set, symbol, and default button.

Namespace:   Microsoft.Web.Management.Client.Win32
Assembly:  Microsoft.Web.Management (in Microsoft.Web.Management.dll)

protected DialogResult ShowMessage(
	string text,
	MessageBoxButtons buttons,
	MessageBoxIcon icon,
	MessageBoxDefaultButton defaultButton
)

Parameters

text
Type: System.String

The message to display in the message box.

buttons
Type: System.Windows.Forms.MessageBoxButtons

One of the System.Windows.Forms.MessageBoxButtons values.

icon
Type: System.Windows.Forms.MessageBoxIcon

One of the System.Windows.Forms.MessageBoxIcon values.

defaultButton
Type: System.Windows.Forms.MessageBoxDefaultButton

One of the System.Windows.Forms.MessageBoxDefaultButton values.

This method enables you to create a custom ShowMessage method. You can check the return System.Windows.Forms.DialogResult value from this method to determine the user's actions.

The following example demonstrates the ShowMessage(String, MessageBoxButtons, MessageBoxIcon, MessageBoxDefaultButton) overload. This example displays a message box that contains Yes and No buttons and an information symbol, and it provides the user an opportunity to cancel the operation. This code example is part of a larger example provided for the WizardPage class.

Return to top
Show: