ExceptionMessageBox Konstruktor

Definisi

Konstruktor kelebihan beban untuk ExceptionMessageBox.

Overload

ExceptionMessageBox()

Membuat instans ExceptionMessageBox dengan properti default.

ExceptionMessageBox(Exception)

Membuat instans dengan ExceptionMessageBox menggunakan informasi dari yang ditentukan Exception.

ExceptionMessageBox(String)

Membuat instans ExceptionMessageBox dengan teks pesan kesalahan tingkat atas yang disediakan.

ExceptionMessageBox(Exception, ExceptionMessageBoxButtons)

Membuat instans dengan ExceptionMessageBox menggunakan informasi dari yang ditentukan Exception dan dengan menentukan tombol untuk ditampilkan dalam kotak pesan.

ExceptionMessageBox(String, String)

Membuat instans ExceptionMessageBox dengan teks pesan kesalahan tingkat atas yang disediakan dan keterangan kotak dialog kotak pesan pengecualian.

ExceptionMessageBox(Exception, ExceptionMessageBoxButtons, ExceptionMessageBoxSymbol)

Membuat instans dengan ExceptionMessageBox menggunakan informasi dari yang ditentukan Exception dan dengan menentukan tombol dan simbol untuk ditampilkan dalam kotak pesan.

ExceptionMessageBox(String, String, ExceptionMessageBoxButtons)

Membuat instans ExceptionMessageBox dengan teks pesan kesalahan tingkat atas yang disediakan dan keterangan kotak dialog kotak pesan pengecualian. Metode ini juga menentukan tombol untuk ditampilkan dalam kotak pesan pengecualian.

ExceptionMessageBox(Exception, ExceptionMessageBoxButtons, ExceptionMessageBoxSymbol, ExceptionMessageBoxDefaultButton)

Membuat instans dengan ExceptionMessageBox menggunakan informasi dari yang ditentukan Exception dan dengan menentukan tombol, simbol, dan tombol default untuk ditampilkan dalam kotak pesan pengecualian. .

ExceptionMessageBox(String, String, ExceptionMessageBoxButtons, ExceptionMessageBoxSymbol)

Membuat instans ExceptionMessageBox dengan teks pesan kesalahan tingkat atas yang disediakan dan keterangan kotak dialog dari kotak pesan pengecualian. Metode ini juga menentukan tombol dan simbol untuk ditampilkan dalam kotak pesan pengecualian.

ExceptionMessageBox(Exception, ExceptionMessageBoxButtons, ExceptionMessageBoxSymbol, ExceptionMessageBoxDefaultButton, ExceptionMessageBoxOptions)

Membuat instans dengan ExceptionMessageBox menggunakan informasi dari yang ditentukan Exception dan dengan menentukan tombol, simbol, tombol default, dan properti lain untuk ditampilkan dalam kotak pesan pengecualian.

ExceptionMessageBox(String, String, ExceptionMessageBoxButtons, ExceptionMessageBoxSymbol, ExceptionMessageBoxDefaultButton)

Membuat instans ExceptionMessageBox dengan teks pesan kesalahan tingkat atas yang disediakan dan keterangan kotak dialog kotak pesan. Metode ini juga menentukan tombol, simbol, dan tombol default untuk ditampilkan dalam kotak pesan pengecualian.

ExceptionMessageBox(String, String, ExceptionMessageBoxButtons, ExceptionMessageBoxSymbol, ExceptionMessageBoxDefaultButton, ExceptionMessageBoxOptions)

Membuat instans ExceptionMessageBox dengan teks pesan kesalahan tingkat atas yang disediakan dan keterangan kotak dialog kotak pesan. Metode ini juga menentukan tombol, simbol, tombol default, dan opsi dialog untuk ditampilkan dalam kotak pesan pengecualian.

ExceptionMessageBox()

Membuat instans ExceptionMessageBox dengan properti default.

public:
 ExceptionMessageBox();
public ExceptionMessageBox ();
Public Sub New ()

Berlaku untuk

ExceptionMessageBox(Exception)

Membuat instans dengan ExceptionMessageBox menggunakan informasi dari yang ditentukan Exception.

public:
 ExceptionMessageBox(Exception ^ exception);
public ExceptionMessageBox (Exception exception);
new Microsoft.SqlServer.MessageBox.ExceptionMessageBox : Exception -> Microsoft.SqlServer.MessageBox.ExceptionMessageBox
Public Sub New (exception As Exception)

Parameter

exception
Exception

Exception yang berisi teks tingkat atas, teks pengecualian dalam, keterangan, data, tautan bantuan, dan informasi tambahan opsional untuk ditampilkan dalam kotak pesan pengecualian.

Contoh

try
{
    // Do something that may generate an exception.
    throw new ApplicationException("An error has occured");
}
catch (ApplicationException ex)
{
    // Define a new top-level error message.
    string str = "The action failed.";

    // Add the new top-level message to the handled exception.
    ApplicationException exTop = new ApplicationException(str, ex);
    exTop.Source = this.Text;

    // Show an exception message box with an OK button (the default).
    ExceptionMessageBox box = new ExceptionMessageBox(exTop);
    box.Show(this);
}
Try
    ' Do something that may generate an exception.
    Throw New ApplicationException("An error has occured")
Catch ex As ApplicationException
    ' Define a new top-level error message.
    Dim str As String = "The action failed."

    ' Add the new top-level message to the handled exception.
    Dim exTop As ApplicationException = New ApplicationException(str, ex)
    exTop.Source = Me.Text

    ' Show an exception message box with an OK button (the default).
    Dim box As ExceptionMessageBox = New ExceptionMessageBox(exTop)
    box.Show(Me)
End Try

Berlaku untuk

ExceptionMessageBox(String)

Membuat instans ExceptionMessageBox dengan teks pesan kesalahan tingkat atas yang disediakan.

public:
 ExceptionMessageBox(System::String ^ text);
public ExceptionMessageBox (string text);
new Microsoft.SqlServer.MessageBox.ExceptionMessageBox : string -> Microsoft.SqlServer.MessageBox.ExceptionMessageBox
Public Sub New (text As String)

Parameter

text
String

Teks kesalahan pesan tingkat atas.

Berlaku untuk

ExceptionMessageBox(Exception, ExceptionMessageBoxButtons)

Membuat instans dengan ExceptionMessageBox menggunakan informasi dari yang ditentukan Exception dan dengan menentukan tombol untuk ditampilkan dalam kotak pesan.

public:
 ExceptionMessageBox(Exception ^ exception, Microsoft::SqlServer::MessageBox::ExceptionMessageBoxButtons buttons);
public ExceptionMessageBox (Exception exception, Microsoft.SqlServer.MessageBox.ExceptionMessageBoxButtons buttons);
new Microsoft.SqlServer.MessageBox.ExceptionMessageBox : Exception * Microsoft.SqlServer.MessageBox.ExceptionMessageBoxButtons -> Microsoft.SqlServer.MessageBox.ExceptionMessageBox
Public Sub New (exception As Exception, buttons As ExceptionMessageBoxButtons)

Parameter

exception
Exception

Exception yang berisi teks tingkat atas, teks pengecualian dalam, keterangan, data, tautan bantuan, dan informasi tambahan opsional untuk ditampilkan dalam kotak pesan pengecualian.

buttons
ExceptionMessageBoxButtons

ExceptionMessageBoxButtons enumerasi yang menentukan tombol untuk ditampilkan dalam kotak pesan.

Berlaku untuk

ExceptionMessageBox(String, String)

Membuat instans ExceptionMessageBox dengan teks pesan kesalahan tingkat atas yang disediakan dan keterangan kotak dialog kotak pesan pengecualian.

public:
 ExceptionMessageBox(System::String ^ text, System::String ^ caption);
public ExceptionMessageBox (string text, string caption);
new Microsoft.SqlServer.MessageBox.ExceptionMessageBox : string * string -> Microsoft.SqlServer.MessageBox.ExceptionMessageBox
Public Sub New (text As String, caption As String)

Parameter

text
String

Teks kesalahan pesan tingkat atas.

caption
String

Keterangan kotak pesan pengecualian.

Berlaku untuk

ExceptionMessageBox(Exception, ExceptionMessageBoxButtons, ExceptionMessageBoxSymbol)

Membuat instans dengan ExceptionMessageBox menggunakan informasi dari yang ditentukan Exception dan dengan menentukan tombol dan simbol untuk ditampilkan dalam kotak pesan.

public:
 ExceptionMessageBox(Exception ^ exception, Microsoft::SqlServer::MessageBox::ExceptionMessageBoxButtons buttons, Microsoft::SqlServer::MessageBox::ExceptionMessageBoxSymbol symbol);
public ExceptionMessageBox (Exception exception, Microsoft.SqlServer.MessageBox.ExceptionMessageBoxButtons buttons, Microsoft.SqlServer.MessageBox.ExceptionMessageBoxSymbol symbol);
new Microsoft.SqlServer.MessageBox.ExceptionMessageBox : Exception * Microsoft.SqlServer.MessageBox.ExceptionMessageBoxButtons * Microsoft.SqlServer.MessageBox.ExceptionMessageBoxSymbol -> Microsoft.SqlServer.MessageBox.ExceptionMessageBox
Public Sub New (exception As Exception, buttons As ExceptionMessageBoxButtons, symbol As ExceptionMessageBoxSymbol)

Parameter

exception
Exception

Exception yang berisi teks tingkat atas, teks pengecualian dalam, keterangan, data, tautan bantuan, dan informasi tambahan opsional untuk ditampilkan dalam kotak pesan pengecualian.

buttons
ExceptionMessageBoxButtons

ExceptionMessageBoxButtons enumerasi yang menentukan tombol untuk ditampilkan dalam kotak pesan pengecualian.

symbol
ExceptionMessageBoxSymbol

ExceptionMessageBoxSymbol enumerasi yang menentukan simbol untuk ditampilkan dalam kotak pesan pengecualian.

Berlaku untuk

ExceptionMessageBox(String, String, ExceptionMessageBoxButtons)

Membuat instans ExceptionMessageBox dengan teks pesan kesalahan tingkat atas yang disediakan dan keterangan kotak dialog kotak pesan pengecualian. Metode ini juga menentukan tombol untuk ditampilkan dalam kotak pesan pengecualian.

public:
 ExceptionMessageBox(System::String ^ text, System::String ^ caption, Microsoft::SqlServer::MessageBox::ExceptionMessageBoxButtons buttons);
public ExceptionMessageBox (string text, string caption, Microsoft.SqlServer.MessageBox.ExceptionMessageBoxButtons buttons);
new Microsoft.SqlServer.MessageBox.ExceptionMessageBox : string * string * Microsoft.SqlServer.MessageBox.ExceptionMessageBoxButtons -> Microsoft.SqlServer.MessageBox.ExceptionMessageBox
Public Sub New (text As String, caption As String, buttons As ExceptionMessageBoxButtons)

Parameter

text
String

Teks kesalahan pesan tingkat atas.

caption
String

Keterangan kotak pesan pengecualian.

buttons
ExceptionMessageBoxButtons

ExceptionMessageBoxButtons enumerasi yang menentukan tombol untuk ditampilkan dalam kotak pesan pengecualian.

Berlaku untuk

ExceptionMessageBox(Exception, ExceptionMessageBoxButtons, ExceptionMessageBoxSymbol, ExceptionMessageBoxDefaultButton)

Membuat instans dengan ExceptionMessageBox menggunakan informasi dari yang ditentukan Exception dan dengan menentukan tombol, simbol, dan tombol default untuk ditampilkan dalam kotak pesan pengecualian. .

public:
 ExceptionMessageBox(Exception ^ exception, Microsoft::SqlServer::MessageBox::ExceptionMessageBoxButtons buttons, Microsoft::SqlServer::MessageBox::ExceptionMessageBoxSymbol symbol, Microsoft::SqlServer::MessageBox::ExceptionMessageBoxDefaultButton defaultButton);
public ExceptionMessageBox (Exception exception, Microsoft.SqlServer.MessageBox.ExceptionMessageBoxButtons buttons, Microsoft.SqlServer.MessageBox.ExceptionMessageBoxSymbol symbol, Microsoft.SqlServer.MessageBox.ExceptionMessageBoxDefaultButton defaultButton);
new Microsoft.SqlServer.MessageBox.ExceptionMessageBox : Exception * Microsoft.SqlServer.MessageBox.ExceptionMessageBoxButtons * Microsoft.SqlServer.MessageBox.ExceptionMessageBoxSymbol * Microsoft.SqlServer.MessageBox.ExceptionMessageBoxDefaultButton -> Microsoft.SqlServer.MessageBox.ExceptionMessageBox
Public Sub New (exception As Exception, buttons As ExceptionMessageBoxButtons, symbol As ExceptionMessageBoxSymbol, defaultButton As ExceptionMessageBoxDefaultButton)

Parameter

exception
Exception

Exception yang berisi teks tingkat atas, teks pengecualian dalam, keterangan, data, tautan bantuan, dan informasi tambahan opsional untuk ditampilkan dalam kotak pesan pengecualian.

buttons
ExceptionMessageBoxButtons

ExceptionMessageBoxButtons enumerasi yang menentukan tombol untuk ditampilkan dalam kotak pesan pengecualian.

symbol
ExceptionMessageBoxSymbol

ExceptionMessageBoxSymbol enumerasi yang menentukan simbol untuk ditampilkan dalam kotak pesan pengecualian.

defaultButton
ExceptionMessageBoxDefaultButton

ExceptionMessageBoxDefaultButton enumerasi yang menentukan tombol default untuk kotak pesan pengecualian.

Berlaku untuk

ExceptionMessageBox(String, String, ExceptionMessageBoxButtons, ExceptionMessageBoxSymbol)

Membuat instans ExceptionMessageBox dengan teks pesan kesalahan tingkat atas yang disediakan dan keterangan kotak dialog dari kotak pesan pengecualian. Metode ini juga menentukan tombol dan simbol untuk ditampilkan dalam kotak pesan pengecualian.

public:
 ExceptionMessageBox(System::String ^ text, System::String ^ caption, Microsoft::SqlServer::MessageBox::ExceptionMessageBoxButtons buttons, Microsoft::SqlServer::MessageBox::ExceptionMessageBoxSymbol symbol);
public ExceptionMessageBox (string text, string caption, Microsoft.SqlServer.MessageBox.ExceptionMessageBoxButtons buttons, Microsoft.SqlServer.MessageBox.ExceptionMessageBoxSymbol symbol);
new Microsoft.SqlServer.MessageBox.ExceptionMessageBox : string * string * Microsoft.SqlServer.MessageBox.ExceptionMessageBoxButtons * Microsoft.SqlServer.MessageBox.ExceptionMessageBoxSymbol -> Microsoft.SqlServer.MessageBox.ExceptionMessageBox
Public Sub New (text As String, caption As String, buttons As ExceptionMessageBoxButtons, symbol As ExceptionMessageBoxSymbol)

Parameter

text
String

Teks kesalahan pesan tingkat atas.

caption
String

Keterangan kotak dialog dari kotak pesan pengecualian.

buttons
ExceptionMessageBoxButtons

ExceptionMessageBoxButtons enumerasi yang menentukan tombol untuk ditampilkan dalam kotak pesan pengecualian.

symbol
ExceptionMessageBoxSymbol

ExceptionMessageBoxSymbol enumerasi yang menentukan simbol untuk ditampilkan dalam kotak pesan pengecualian.

Berlaku untuk

ExceptionMessageBox(Exception, ExceptionMessageBoxButtons, ExceptionMessageBoxSymbol, ExceptionMessageBoxDefaultButton, ExceptionMessageBoxOptions)

Membuat instans dengan ExceptionMessageBox menggunakan informasi dari yang ditentukan Exception dan dengan menentukan tombol, simbol, tombol default, dan properti lain untuk ditampilkan dalam kotak pesan pengecualian.

public:
 ExceptionMessageBox(Exception ^ exception, Microsoft::SqlServer::MessageBox::ExceptionMessageBoxButtons buttons, Microsoft::SqlServer::MessageBox::ExceptionMessageBoxSymbol symbol, Microsoft::SqlServer::MessageBox::ExceptionMessageBoxDefaultButton defaultButton, Microsoft::SqlServer::MessageBox::ExceptionMessageBoxOptions options);
public ExceptionMessageBox (Exception exception, Microsoft.SqlServer.MessageBox.ExceptionMessageBoxButtons buttons, Microsoft.SqlServer.MessageBox.ExceptionMessageBoxSymbol symbol, Microsoft.SqlServer.MessageBox.ExceptionMessageBoxDefaultButton defaultButton, Microsoft.SqlServer.MessageBox.ExceptionMessageBoxOptions options);
new Microsoft.SqlServer.MessageBox.ExceptionMessageBox : Exception * Microsoft.SqlServer.MessageBox.ExceptionMessageBoxButtons * Microsoft.SqlServer.MessageBox.ExceptionMessageBoxSymbol * Microsoft.SqlServer.MessageBox.ExceptionMessageBoxDefaultButton * Microsoft.SqlServer.MessageBox.ExceptionMessageBoxOptions -> Microsoft.SqlServer.MessageBox.ExceptionMessageBox
Public Sub New (exception As Exception, buttons As ExceptionMessageBoxButtons, symbol As ExceptionMessageBoxSymbol, defaultButton As ExceptionMessageBoxDefaultButton, options As ExceptionMessageBoxOptions)

Parameter

exception
Exception

Exception yang berisi teks tingkat atas, teks pengecualian dalam, keterangan, data, tautan bantuan, dan informasi tambahan opsional untuk ditampilkan dalam kotak pesan pengecualian.

buttons
ExceptionMessageBoxButtons

ExceptionMessageBoxButtons enumerasi yang menentukan tombol untuk ditampilkan dalam kotak pesan pengecualian.

symbol
ExceptionMessageBoxSymbol

ExceptionMessageBoxSymbol enumerasi yang menentukan simbol untuk ditampilkan dalam kotak pesan pengecualian.

defaultButton
ExceptionMessageBoxDefaultButton

ExceptionMessageBoxDefaultButton enumerasi yang menentukan tombol default untuk kotak pesan pengecualian.

options
ExceptionMessageBoxOptions

ExceptionMessageBoxOptions Enumerasi yang mengontrol perilaku lain dari kotak pesan pengecualian.

Berlaku untuk

ExceptionMessageBox(String, String, ExceptionMessageBoxButtons, ExceptionMessageBoxSymbol, ExceptionMessageBoxDefaultButton)

Membuat instans ExceptionMessageBox dengan teks pesan kesalahan tingkat atas yang disediakan dan keterangan kotak dialog kotak pesan. Metode ini juga menentukan tombol, simbol, dan tombol default untuk ditampilkan dalam kotak pesan pengecualian.

public:
 ExceptionMessageBox(System::String ^ text, System::String ^ caption, Microsoft::SqlServer::MessageBox::ExceptionMessageBoxButtons buttons, Microsoft::SqlServer::MessageBox::ExceptionMessageBoxSymbol symbol, Microsoft::SqlServer::MessageBox::ExceptionMessageBoxDefaultButton defaultButton);
public ExceptionMessageBox (string text, string caption, Microsoft.SqlServer.MessageBox.ExceptionMessageBoxButtons buttons, Microsoft.SqlServer.MessageBox.ExceptionMessageBoxSymbol symbol, Microsoft.SqlServer.MessageBox.ExceptionMessageBoxDefaultButton defaultButton);
new Microsoft.SqlServer.MessageBox.ExceptionMessageBox : string * string * Microsoft.SqlServer.MessageBox.ExceptionMessageBoxButtons * Microsoft.SqlServer.MessageBox.ExceptionMessageBoxSymbol * Microsoft.SqlServer.MessageBox.ExceptionMessageBoxDefaultButton -> Microsoft.SqlServer.MessageBox.ExceptionMessageBox
Public Sub New (text As String, caption As String, buttons As ExceptionMessageBoxButtons, symbol As ExceptionMessageBoxSymbol, defaultButton As ExceptionMessageBoxDefaultButton)

Parameter

text
String

Teks kesalahan pesan tingkat atas.

caption
String

Keterangan kotak dialog dari kotak pesan pengecualian.

buttons
ExceptionMessageBoxButtons

ExceptionMessageBoxButtons enumerasi yang menentukan tombol untuk ditampilkan dalam kotak pesan pengecualian.

symbol
ExceptionMessageBoxSymbol

ExceptionMessageBoxSymbol enumerasi yang menentukan simbol untuk ditampilkan dalam kotak pesan pengecualian.

defaultButton
ExceptionMessageBoxDefaultButton

ExceptionMessageBoxDefaultButton enumerasi yang menentukan tombol default untuk kotak pesan pengecualian.

Contoh

// Define the message and caption to display.
string str = @"Are you sure you want to delete file 'c:\somefile.txt'?";
string caption = "Confirm File Deletion";

// Show the exception message box with Yes and No buttons.
ExceptionMessageBox box = new ExceptionMessageBox(str,
    caption, ExceptionMessageBoxButtons.YesNo,
    ExceptionMessageBoxSymbol.Question,
    ExceptionMessageBoxDefaultButton.Button2);

if (DialogResult.Yes == box.Show(this))
{
    // Delete the file.
}
' Define the message and caption to display.
Dim str As String = "Are you sure you want to delete file 'c:\somefile.txt'?"
Dim caption As String = "Confirm File Deletion"

' Show the exception message box with Yes and No buttons.
Dim box As ExceptionMessageBox = New ExceptionMessageBox(str, _
 caption, ExceptionMessageBoxButtons.YesNo, _
 ExceptionMessageBoxSymbol.Question, _
 ExceptionMessageBoxDefaultButton.Button2)

If Windows.Forms.DialogResult.Yes = box.Show(Me) Then
    ' Delete the file.
End If

Berlaku untuk

ExceptionMessageBox(String, String, ExceptionMessageBoxButtons, ExceptionMessageBoxSymbol, ExceptionMessageBoxDefaultButton, ExceptionMessageBoxOptions)

Membuat instans ExceptionMessageBox dengan teks pesan kesalahan tingkat atas yang disediakan dan keterangan kotak dialog kotak pesan. Metode ini juga menentukan tombol, simbol, tombol default, dan opsi dialog untuk ditampilkan dalam kotak pesan pengecualian.

public:
 ExceptionMessageBox(System::String ^ text, System::String ^ caption, Microsoft::SqlServer::MessageBox::ExceptionMessageBoxButtons buttons, Microsoft::SqlServer::MessageBox::ExceptionMessageBoxSymbol symbol, Microsoft::SqlServer::MessageBox::ExceptionMessageBoxDefaultButton defaultButton, Microsoft::SqlServer::MessageBox::ExceptionMessageBoxOptions options);
public ExceptionMessageBox (string text, string caption, Microsoft.SqlServer.MessageBox.ExceptionMessageBoxButtons buttons, Microsoft.SqlServer.MessageBox.ExceptionMessageBoxSymbol symbol, Microsoft.SqlServer.MessageBox.ExceptionMessageBoxDefaultButton defaultButton, Microsoft.SqlServer.MessageBox.ExceptionMessageBoxOptions options);
new Microsoft.SqlServer.MessageBox.ExceptionMessageBox : string * string * Microsoft.SqlServer.MessageBox.ExceptionMessageBoxButtons * Microsoft.SqlServer.MessageBox.ExceptionMessageBoxSymbol * Microsoft.SqlServer.MessageBox.ExceptionMessageBoxDefaultButton * Microsoft.SqlServer.MessageBox.ExceptionMessageBoxOptions -> Microsoft.SqlServer.MessageBox.ExceptionMessageBox
Public Sub New (text As String, caption As String, buttons As ExceptionMessageBoxButtons, symbol As ExceptionMessageBoxSymbol, defaultButton As ExceptionMessageBoxDefaultButton, options As ExceptionMessageBoxOptions)

Parameter

text
String

Teks kesalahan pesan tingkat atas.

caption
String

Keterangan kotak dialog dari kotak pesan pengecualian.

buttons
ExceptionMessageBoxButtons

ExceptionMessageBoxSymbol enumerasi yang menentukan simbol untuk ditampilkan dalam kotak pesan pengecualian.

symbol
ExceptionMessageBoxSymbol

ExceptionMessageBoxSymbol enumerasi yang menentukan simbol untuk ditampilkan dalam kotak pesan pengecualian.

defaultButton
ExceptionMessageBoxDefaultButton

ExceptionMessageBoxDefaultButton enumerasi yang menentukan tombol default untuk kotak pesan pengecualian.

options
ExceptionMessageBoxOptions

ExceptionMessageBoxOptions Enumerasi yang mengontrol perilaku lain dari kotak pesan pengecualian.

Berlaku untuk