Visual Basic Reference

Visual Studio 6.0

Forms Property

See Also    Example    Applies To

Returns a Forms collection, which is a collection whose elements represent each loaded form in an application. The collection includes the application's MDI form, MDI child forms, and non-MDI forms. The Forms collection has a single property, Count, that specifies the number of elements in the collection.

Syntax

Forms(index)

The placeholder index represents an integer with a range from 0 to Forms.Count - 1.

Remarks

You can use the Forms collection to iterate through all loaded forms in an application. It identifies an intrinsic global variable named Forms. You can pass Forms(index) to a function whose argument is specified as a Forms class.

Show: