ExceptionMessageBox.ShowCheckBox ExceptionMessageBox.ShowCheckBox ExceptionMessageBox.ShowCheckBox Property


예외 메시지 상자에 확인란을 표시할지 여부를 지정합니다. Specifies whether to show the check box in the exception message box.

 property bool ShowCheckBox { bool get(); void set(bool value); };
public bool ShowCheckBox { get; set; }
Public Property ShowCheckBox As Boolean
속성 값

A Boolean 값입니다. A Boolean value.


	// 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";

		// Set the global variable.
		alwaysShow = box.IsCheckBoxChecked;
    ' 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"

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


예외 메시지 상자를 표시할지 여부를 결정 하는 예외가 발생 하면 런타임 시 확인란의 값을 계산할 수 있습니다.The value of the check box can be evaluated at runtime when an exception occurs to determine whether to display the exception message box. 자세한 내용은 참조 프로그램 예외 메시지 상자합니다.For more information, see Program Exception Message Box.

기본값은 false입니다.The default value is false.

적용 대상

추가 정보