SqlStudioMessageBox.Show Method (Exception, String, MessageBoxButtons)
Displays a message box with the exception that is thrown when an error occurs during application execution and the specified caption and 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, _
buttons As MessageBoxButtons _
) As DialogResult
'Usage
Dim error As Exception
Dim caption As String
Dim buttons As MessageBoxButtons
Dim returnValue As DialogResult
returnValue = SqlStudioMessageBox.Show(error, caption, _
buttons)
public static DialogResult Show(
Exception error,
string caption,
MessageBoxButtons buttons
)
public:
static DialogResult Show(
Exception^ error,
String^ caption,
MessageBoxButtons buttons
)
static member Show :
error:Exception *
caption:string *
buttons:MessageBoxButtons -> DialogResult
public static function Show(
error : Exception,
caption : String,
buttons : MessageBoxButtons
) : 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.
- buttons
Type: System.Windows.Forms.MessageBoxButtons
One of the MessageBoxButtons values that specifies which buttons to display in the message box.
Return Value
Type: System.Windows.Forms.DialogResult
One of the DialogResult values.