ExceptionMessageBox.CheckBoxText ExceptionMessageBox.CheckBoxText ExceptionMessageBox.CheckBoxText Property

정의

ShowCheckBoxtrue일 때 예외 메시지 상자의 확인란에 표시할 텍스트를 가져오거나 설정합니다. Gets or sets the text to display in the check box on the exception message box when ShowCheckBox is true.

public:
 property System::String ^ CheckBoxText { System::String ^ get(); void set(System::String ^ value); };
public string CheckBoxText { get; set; }
Public Property CheckBoxText As String
속성 값

A String 값입니다. A String value.

예제

try
{
	// Do something that may cause an exception.
	throw new ApplicationException("An error has occured.");
}
catch (ApplicationException ex)
{
	string str = "The action failed.";
	ApplicationException exTop = new ApplicationException(str, ex);
	exTop.Source = this.Text;

	// Show a message box if the global variable is true.
	if (alwaysShow)
	{
		ExceptionMessageBox box = new ExceptionMessageBox(exTop);
		box.ShowCheckBox = true;
		box.IsCheckBoxChecked = true;
		box.CheckBoxText = "Always show this message";
		box.Show(this);

		// Set the global variable.
		alwaysShow = box.IsCheckBoxChecked;
	}
}
Try
    ' Do something that may cause an exception.
    Throw New ApplicationException("An error has occured.")
Catch ex As ApplicationException
    Dim str As String = "The action failed."
    Dim exTop As ApplicationException = New ApplicationException(str, ex)
    exTop.Source = Me.Text

    ' Show a message box if the global variable is true.
    If alwaysShow Then
        Dim box As ExceptionMessageBox = New ExceptionMessageBox(exTop)
        box.ShowCheckBox = True
        box.IsCheckBoxChecked = True
        box.CheckBoxText = "Always show this message"
        box.Show(Me)

        ' Set the global variable.
        alwaysShow = box.IsCheckBoxChecked
    End If
End Try

설명

기본값은 "이이 메시지를 다시 표시 안 함"입니다.The default value is "Do not show this message again".

적용 대상