DesktopWindow.ControlCount

From Xojo Documentation

Read-Only Property (As Integer )
IntegerValue = aDesktopWindow.ControlCount

New in 2021r3

Supported for all project types and targets.

The number of controls in the window.

Example

The following example is in the Action event of a DesktopButton. It displays the number of controls in the Window:

MsgBox(Self.ControlCount.ToString)