SqlStudioMessageBox.Show Method (Exception, String, MessageBoxIcon, MessageBoxDefaultButton)
Displays a message box with the exception that is thrown when an error occurs during application execution. The message box has the specified caption, 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 ( _
error As Exception, _
caption As String, _
icon As MessageBoxIcon, _
defaultButton As MessageBoxDefaultButton _
) As DialogResult
'Usage
Dim error As Exception
Dim caption As String
Dim icon As MessageBoxIcon
Dim defaultButton As MessageBoxDefaultButton
Dim returnValue As DialogResult
returnValue = SqlStudioMessageBox.Show(error, caption, _
icon, defaultButton)
public static DialogResult Show(
Exception error,
string caption,
MessageBoxIcon icon,
MessageBoxDefaultButton defaultButton
)
public:
static DialogResult Show(
Exception^ error,
String^ caption,
MessageBoxIcon icon,
MessageBoxDefaultButton defaultButton
)
static member Show :
error:Exception *
caption:string *
icon:MessageBoxIcon *
defaultButton:MessageBoxDefaultButton -> DialogResult
public static function Show(
error : Exception,
caption : String,
icon : MessageBoxIcon,
defaultButton : MessageBoxDefaultButton
) : DialogResult
Parameters
- error
Type: System.Exception
Represents an error that occurs during application execution.
- caption
Type: System.String
The text to display in the title bar of 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.