ControlsCount Property (AForm)

Returns the number of control objects in the form.

Syntax

[ lControlsCount = ] Object.ControlsCount

The Controls property syntax has the following parts:

 

Name

Type

Description

Object

AForm

AForm object

lControlsCount

Long

A integer specifying the number of controls in the form.

Comments

This property is not available at design time and is read-only at run time.

You can use this property to cycle through all the controls on a container and perform an operation on each.

Example

The following example disables every control on the form:

for i=0 to ControlsCount-1

Controls(i).Enable=false

next

Applies to

AForm

See Also

Controls