System.Windows.Forms.Design.IUIService.ShowMessage Method

Displays the specified message in a message box with the specified caption and buttons to place on the dialog box.

Syntax

public System.Windows.Forms.DialogResult ShowMessage (string message, string caption, System.Windows.Forms.MessageBoxButtons buttons)

Parameters

message
The message to display.
caption
The caption for the dialog box.
buttons
One of the System.Windows.Forms.MessageBoxButtons values: System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxButtons.OKCancel, System.Windows.Forms.MessageBoxButtons.YesNo, or System.Windows.Forms.MessageBoxButtons.YesNoCancel.

Returns

One of the System.Windows.Forms.DialogResult values indicating the result code returned by the dialog box.

Remarks

This method ensures that the display of the message box is properly integrated with the development environment.

Requirements

Namespace: System.Windows.Forms.Design
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0