DesktopCheckBox.Value

From Xojo Documentation

Property (As Boolean )
aDesktopCheckBox.Value = newBooleanValue
or
BooleanValue = aDesktopCheckBox.Value

New in 2021r3

Supported for all project types and targets.

The boolean value of the checkbox. Setting it to True sets it to checked and False sets it to unchecked.

Notes

The DesktopCheckBox is a tri-state control. Changing the VisualState property automatically changes the Value property. Changing the VisualState to Checked or Indeterminate automatically changes the Value to True if it isn't already. See the VisualState property and the VisualStates enum for more information. The ValueChanged event fires when the Value property is changed.

Sample Code

This code is in the ValueChanged event of the checkbox and displays a message box each time the Checkbox is clicked. It reports on whether the the click changes it from True to False or vice-versa.

If Me.Value Then
MessageBox("CheckBox is checked")
Else
MessageBox("Checkbox is unchecked")
End If