Share via


SqlStudioMessageBox.Show Method (String, MessageBoxButtons, MessageBoxIcon, MessageBoxDefaultButton)

Displays a message box with the specified text, buttons, icon, and default button.

Namespace:  Microsoft.SqlServer.Management.Controls
Assembly:  Microsoft.SqlServer.Management.Controls (in Microsoft.SqlServer.Management.Controls.dll)

Syntax

'Declaration
Public Shared Function Show ( _
    text As String, _
    buttons As MessageBoxButtons, _
    icon As MessageBoxIcon, _
    defaultButton As MessageBoxDefaultButton _
) As DialogResult
'Usage
Dim text As String
Dim buttons As MessageBoxButtons
Dim icon As MessageBoxIcon
Dim defaultButton As MessageBoxDefaultButton
Dim returnValue As DialogResult

returnValue = SqlStudioMessageBox.Show(text, buttons, _
    icon, defaultButton)
public static DialogResult Show(
    string text,
    MessageBoxButtons buttons,
    MessageBoxIcon icon,
    MessageBoxDefaultButton defaultButton
)
public:
static DialogResult Show(
    String^ text, 
    MessageBoxButtons buttons, 
    MessageBoxIcon icon, 
    MessageBoxDefaultButton defaultButton
)
static member Show : 
        text:string * 
        buttons:MessageBoxButtons * 
        icon:MessageBoxIcon * 
        defaultButton:MessageBoxDefaultButton -> DialogResult 
public static function Show(
    text : String, 
    buttons : MessageBoxButtons, 
    icon : MessageBoxIcon, 
    defaultButton : MessageBoxDefaultButton
) : DialogResult

Parameters

  • text
    Type: System.String
    The text to display in the message box.

Return Value

Type: System.Windows.Forms.DialogResult
One of the DialogResult values.