DesktopUIControl.Active

From Xojo Documentation

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

New in 2021r3

Supported for all project types and targets.

Indicates whether the DesktopUIControl is active.

Notes

Active is False when the DesktopUIControl's window is not in the foreground. When a DesktopWindow is deactivated, its controls are automatically deactivated unless AllowAutoDeactivate is set to False.