ExceptionMessageBox.IsCheckBoxChecked Property


Specifies whether the check box is selected when P:Microsoft.SqlServer.MessageBox.ExceptionMessageBox.ShowCheckbox is true.

Namespace:   Microsoft.SqlServer.MessageBox
Assembly:  Microsoft.ExceptionMessageBox (in Microsoft.ExceptionMessageBox.dll)

public bool IsCheckBoxChecked { get; set; }

Property Value

Type: System.Boolean

A Boolean value.

The default value is false.

Legacy Code Example

	// 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;
Return to top