ExceptionMessageBox 클래스

정의

Microsoft Windows .NET Framework 기반 애플리케이션을 사용하여 고객 환경을 개선하기 위해 텍스트, 단추 및 기호로 사용자 지정할 수 있는 메시지 상자를 표시합니다.

public ref class ExceptionMessageBox
[System.Runtime.InteropServices.ComVisible(false)]
public class ExceptionMessageBox
[<System.Runtime.InteropServices.ComVisible(false)>]
type ExceptionMessageBox = class
Public Class ExceptionMessageBox
상속
ExceptionMessageBox
특성

예제

다음은 확인 단추가 있는 메시지 상자를 표시하는 예제입니다.

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

이 예에서는 예외 메시지 상자를 사용하여 문제 해결이나 디버깅에 도움이 되는 추가적인 정보를 표시합니다.

try
{
    // Do something that you don't expect to generate an exception.
    throw new ApplicationException("Failed to connect to the server.");
}
catch (ApplicationException ex)
{
    string str = "An unexpected error occurred. Please call Helpdesk.";
    ApplicationException exTop = new ApplicationException(str, ex);
    exTop.Source = this.Text;

    // Information in the Data property of an exception that has a name
    // beginning with "HelpLink.Advanced" is shown when the user
    // clicks the Advanced Information button of the exception message
    // box dialog box.
    exTop.Data.Add("AdvancedInformation.FileName", "application.dll");
    exTop.Data.Add("AdvancedInformation.FilePosition", "line 355");
    exTop.Data.Add("AdvancedInformation.UserContext", "single user mode");

    // Show the exception message box with additional information that 
    // is helpful when a user calls technical support.
    ExceptionMessageBox box = new ExceptionMessageBox(exTop);

    box.Show(this);
}
Try
    ' Do something that you don't expect to generate an exception.
    Throw New ApplicationException("Failed to connect to the server.")
Catch ex As ApplicationException
    Dim str As String = "An unexpected error occurred. Please call Helpdesk."
    Dim exTop As ApplicationException = New ApplicationException(str, ex)
    exTop.Source = Me.Text

    ' Information in the Data property of an exception that has a name
    ' beginning with "HelpLink.Advanced" is shown when the user
    ' clicks the Advanced Information button of the exception message
    ' box dialog box.
    exTop.Data.Add("AdvancedInformation.FileName", "application.dll")
    exTop.Data.Add("AdvancedInformation.FilePosition", "line 355")
    exTop.Data.Add("AdvancedInformation.UserContext", "single user mode")

    ' Show the exception message box with additional information that 
    ' is helpful when a user calls technical support.
    Dim box As ExceptionMessageBox = New ExceptionMessageBox(exTop)

    box.Show(Me)

End Try

생성자

ExceptionMessageBox()

기본 속성을 사용하여 ExceptionMessageBox 인스턴스를 만듭니다.

ExceptionMessageBox(Exception)

지정한 ExceptionMessageBox의 정보를 사용하여 Exception 인스턴스를 만듭니다.

ExceptionMessageBox(Exception, ExceptionMessageBoxButtons)

지정한 ExceptionMessageBox의 정보를 사용하고 메시지 상자에 표시할 단추를 지정하여 Exception 인스턴스를 만듭니다.

ExceptionMessageBox(Exception, ExceptionMessageBoxButtons, ExceptionMessageBoxSymbol)

지정한 ExceptionMessageBox의 정보를 사용하고 메시지 상자에 표시할 단추와 기호를 지정하여 Exception 인스턴스를 만듭니다.

ExceptionMessageBox(Exception, ExceptionMessageBoxButtons, ExceptionMessageBoxSymbol, ExceptionMessageBoxDefaultButton)

지정한 ExceptionMessageBox의 정보를 사용하고 예외 메시지 상자에 표시할 단추, 기호 및 기본 단추를 지정하여 Exception 인스턴스를 만듭니다. .

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

지정한 ExceptionMessageBox의 정보를 사용하고 예외 메시지 상자에 표시할 단추, 기호, 기본 단추 및 기타 속성을 지정하여 Exception 인스턴스를 만듭니다.

ExceptionMessageBox(String)

제공된 최상위 오류 메시지 텍스트를 사용하여 ExceptionMessageBox 인스턴스를 만듭니다.

ExceptionMessageBox(String, String)

제공된 최상위 오류 메시지 텍스트와 예외 메시지 상자의 대화 상자 캡션을 사용하여 ExceptionMessageBox 인스턴스를 만듭니다.

ExceptionMessageBox(String, String, ExceptionMessageBoxButtons)

제공된 최상위 오류 메시지 텍스트와 예외 메시지 상자의 대화 상자 캡션을 사용하여 ExceptionMessageBox 인스턴스를 만듭니다. 이 메서드는 예외 메시지 상자에 표시할 단추도 지정합니다.

ExceptionMessageBox(String, String, ExceptionMessageBoxButtons, ExceptionMessageBoxSymbol)

제공된 최상위 오류 메시지 텍스트와 예외 메시지 상자의 대화 상자 캡션을 사용하여 ExceptionMessageBox 인스턴스를 만듭니다. 이 메서드는 예외 메시지 상자에 표시할 단추와 기호도 지정합니다.

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

제공된 최상위 오류 메시지 텍스트와 메시지 상자의 대화 상자 캡션을 사용하여 ExceptionMessageBox 인스턴스를 만듭니다. 이 메서드는 예외 메시지 상자에 표시할 단추, 기호 및 기본 단추도 지정합니다.

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

제공된 최상위 오류 메시지 텍스트와 메시지 상자의 대화 상자 캡션을 사용하여 ExceptionMessageBox 인스턴스를 만듭니다. 이 메서드는 예외 메시지 상자에 표시할 단추, 기호, 기본 단추 및 대화 상자 옵션도 지정합니다.

속성

AbortButtonText

중단 단추의 기본 텍스트를 가져옵니다.

Beep

메시지가 표시될 때 소리를 낼지 여부를 지정합니다.

Buttons

메시지 상자에 표시할 단추를 가져오거나 설정합니다.

CancelButtonText

취소 단추의 기본 텍스트를 가져옵니다.

Caption

예외 메시지 상자의 대화 상자 캡션을 가져오거나 설정합니다.

CheckBoxRegistryKey

RegistryKeytrue일 때 예외 메시지 상자에 표시되는 확인란을 제어하는 열린 ShowCheckBox를 설정합니다.

CheckBoxRegistryMeansDoNotShowDialog

CheckBoxRegistryKeyCheckBoxRegistryValue로 지정된 레지스트리 값 내용이 이 메시지를 보지 않겠다는 사용자의 이전 의사 결정을 나타내는지 여부를 확인합니다.

CheckBoxRegistryValue

ShowCheckBoxtrue일 때 예외 메시지 상자의 확인란을 제어하는 레지스트리 값 이름을 가져오거나 설정합니다.

CheckBoxText

ShowCheckBoxtrue일 때 예외 메시지 상자의 확인란에 표시할 텍스트를 가져오거나 설정합니다.

CustomDialogResult

클릭된 사용자 지정 텍스트 대화 상자 단추를 가져옵니다.

CustomSymbol

예외 메시지 상자에서 기호로 사용할 사용자 지정 비트맵을 가져오거나 설정합니다.

Data

최상위 메시지에 연결된 도움말 링크와 고급 정보를 저장하는 IDictionary 인터페이스를 가져옵니다.

DefaultButton

메시지 상자의 기본 단추를 가져오거나 설정합니다.

DefaultDialogResult

사용자가 지정한 메시지를 다시 표시하지 않도록 이전에 결정한 경우 Show(IWin32Window) 메서드에서 반환되는 값을 가져오거나 설정합니다.

FailButtonText

실패 단추의 기본 텍스트를 가져옵니다.

Font

메시지 상자에 사용되는 글꼴을 가져오거나 설정합니다.

HelpLink

최상위 메시지에 연결된 도움말 파일 또는 도움말 웹 페이지의 링크를 가져오거나 설정합니다.

IgnoreButtonText

무시 단추의 기본 텍스트를 가져옵니다.

InnerException

하위 메시지에 연결된 Exception 인스턴스를 가져오거나 설정합니다.

IsCheckBoxChecked

ShowCheckBoxtrue일 때 확인란이 선택되는지 여부를 지정합니다.

Message

표시할 메시지가 포함된 Exception을 가져오거나 설정합니다.

MessageLevelDefault

메시지 상자에 표시할 메시지 수준의 수를 가져오거나 설정합니다.

NoButtonText

아니요 단추의 기본 텍스트를 가져옵니다.

OKButtonText

확인 단추의 기본 텍스트를 가져옵니다.

Options

메시지 상자의 기타 표시 옵션을 가져오거나 설정합니다.

RetryButtonText

다시 시도 단추의 기본 텍스트를 가져옵니다.

ShowCheckBox

예외 메시지 상자에 확인란을 표시할지 여부를 지정합니다.

ShowToolBar

예외 메시지 상자에 명령 단추 도구 모음을 표시할지 여부를 지정합니다.

Symbol

예외 메시지 상자에 표시할 기호를 가져오거나 설정합니다.

Text

예외 메시지 상자에 표시할 최상위 메시지의 텍스트를 가져오거나 설정합니다.

UseOwnerFont

소유자 창의 글꼴을 검색해서 예외 메시지 상자의 글꼴로 사용할지 여부를 지정합니다.

YesButtonText

단추의 기본 텍스트를 가져옵니다.

메서드

GetMessageText(Exception)

예외 메시지 상자에 예외가 표시될 때 사용자가 클립보드에 복사할 수 있는 문자열을 반환합니다.

SetButtonText(String)

예외 메시지 상자에 단추가 하나만 표시될 때 사용자 지정 텍스트 단추의 텍스트를 설정합니다.

SetButtonText(String, String)

예외 메시지 상자에 단추가 두 개만 표시될 때 사용자 지정 텍스트 단추의 텍스트를 설정합니다.

SetButtonText(String, String, String)

예외 메시지 상자에 단추가 세 개만 표시될 때 사용자 지정 텍스트 단추의 텍스트를 설정합니다.

SetButtonText(String, String, String, String)

예외 메시지 상자에 단추가 네 개만 표시될 때 사용자 지정 텍스트 단추의 텍스트를 설정합니다.

SetButtonText(String, String, String, String, String)

예외 메시지 상자에 단추가 다섯 개만 표시될 때 사용자 지정 텍스트 단추의 텍스트를 설정합니다.

Show(IntPtr, String, String, String, String, String, String, String)

예외 메시지 상자를 표시합니다. 정보를 제공하기 위해서만 확인됩니다. 지원 안 됨 향후 호환성은 보장되지 않습니다.

Show(IWin32Window)

예외 메시지 상자를 부모 창 가운데에 모달 대화 상자로 표시합니다.

이벤트

OnCopyToClipboard

예외 메시지 텍스트가 메시지 상자에서 클립보드로 복사될 때 발생합니다.

적용 대상