ShowMessage(String,Control,ButtonConfiguration,Boolean) Method
Displays a message box with a custom user control in place of the message text.
Syntax
public static System.Windows.Forms.DialogResult ShowMessage(
System.string title,
System.Windows.Forms.Control customContent,
ButtonConfiguration btnType,
System.bool isError
)Public Overloads Shared Function ShowMessage( _
ByVal title As System.String, _
ByVal customContent As System.Windows.Forms.Control, _
ByVal btnType As ButtonConfiguration, _
ByVal isError As System.Boolean _
) As System.Windows.Forms.DialogResultParameters
| Name | Description |
|---|---|
| title | The caption of the dialog box. |
| customContent | The control that will be shown instead of the standard message label. |
| btnType | The button selection that will be made available in the dialog box. |
| isError | True if this dialog represents an error condition. If so, the dialog will show and error system icon. |
Return Value
The windows DialogResult which describes the button that was selected. The following chart shows the possible return codes for each button. Button Return Code "Abort", "Skip All" DialogResult.Abort "Cancel" DialogResult.Cancel "No" DialogResult.No "OK" DialogResult.OK "Retry" DialogResult.Retry "Skip" DialogResult.Ignore "Yes" DialogResult.Yes
Remarks
This can be used if the desired display is more complicated than text that can be shown in a simple label. The control should implement the IClipboardProvider interface so that it's contents can be copied to the clipboard when the user hits CTRL+C.