RectControl.Active

From Xojo Documentation

Read-Only Property (As Boolean )
BooleanValue = aRectControl.Active

New in 5.0

Supported for all project types and targets.

Indicates whether the RectControl is active.

Notes

Active is False when the RectControl's window is not in the foreground. When a Window is deactivated, its controls are automatically deactivated unless AutoDeactivate is set to False.