SqlStudioMessageBox.Show Method (IWin32Window, Exception, String, MessageBoxButtons)
Displays a message box in front of the specified object with an exception that is thrown when an error occurs during application execution. The message box has the specified caption and buttons.
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, _
caption As String, _
buttons As MessageBoxButtons _
) As DialogResult
'Usage
Dim owner As IWin32Window
Dim error As Exception
Dim caption As String
Dim buttons As MessageBoxButtons
Dim returnValue As DialogResult
returnValue = SqlStudioMessageBox.Show(owner, error, _
caption, buttons)
public static DialogResult Show(
IWin32Window owner,
Exception error,
string caption,
MessageBoxButtons buttons
)
public:
static DialogResult Show(
IWin32Window^ owner,
Exception^ error,
String^ caption,
MessageBoxButtons buttons
)
static member Show :
owner:IWin32Window *
error:Exception *
caption:string *
buttons:MessageBoxButtons -> DialogResult
public static function Show(
owner : IWin32Window,
error : Exception,
caption : String,
buttons : MessageBoxButtons
) : DialogResult
Parameters
- owner
Type: System.Windows.Forms.IWin32Window
An implementation of IWin32Window that will own the modal dialog box
- 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.