SqlStudioMessageBox.Show Method (IWin32Window, Exception, MessageBoxButtons, MessageBoxIcon, MessageBoxDefaultButton)
Displays a message box in front of the specified object with the exception that is thrown when an error occurs during application execution. The message box has the specified 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 ( _
owner As IWin32Window, _
error As Exception, _
buttons As MessageBoxButtons, _
icon As MessageBoxIcon, _
defaultButton As MessageBoxDefaultButton _
) As DialogResult
'Usage
Dim owner As IWin32Window
Dim error As Exception
Dim buttons As MessageBoxButtons
Dim icon As MessageBoxIcon
Dim defaultButton As MessageBoxDefaultButton
Dim returnValue As DialogResult
returnValue = SqlStudioMessageBox.Show(owner, error, _
buttons, icon, defaultButton)
public static DialogResult Show(
IWin32Window owner,
Exception error,
MessageBoxButtons buttons,
MessageBoxIcon icon,
MessageBoxDefaultButton defaultButton
)
public:
static DialogResult Show(
IWin32Window^ owner,
Exception^ error,
MessageBoxButtons buttons,
MessageBoxIcon icon,
MessageBoxDefaultButton defaultButton
)
static member Show :
owner:IWin32Window *
error:Exception *
buttons:MessageBoxButtons *
icon:MessageBoxIcon *
defaultButton:MessageBoxDefaultButton -> DialogResult
public static function Show(
owner : IWin32Window,
error : Exception,
buttons : MessageBoxButtons,
icon : MessageBoxIcon,
defaultButton : MessageBoxDefaultButton
) : DialogResult
Parameters
- owner
Type: System.Windows.Forms.IWin32Window
An implementation of IWin32Window that will own the modal dialog box.
- error
Type: System.Exception
Represents errors that occur during application execution.
- buttons
Type: System.Windows.Forms.MessageBoxButtons
One of the MessageBoxButtons values that specifies which buttons to display in the message box.
- icon
Type: System.Windows.Forms.MessageBoxIcon
One of the MessageBoxIcon values that specifies which icon to display in the message box.
- defaultButton
Type: System.Windows.Forms.MessageBoxDefaultButton
One of the MessageBoxDefaultButton values that specifies the default button for the message box.
Return Value
Type: System.Windows.Forms.DialogResult
One of the DialogResult values.