Caption Property

Applies to:  Window object
See also:  Text Property

Returns or sets the caption associated with a window.

Syntax:

object.Caption

The Caption syntax has these parts:

Part Description
object The name of a Window object.

Remarks:

Under MicrosoftWindows, any window can have an associated text string.  For top-level windows or MdiChild windows, this string contains the caption displayed in the window's title bar.  For other windows, such as command buttons and other controls, the associated text is the text displayed in the control.

The Caption property and Text property are linked to the same underlying window property, so that setting the Caption property is equivalent to setting the Text property, and vice versa.

Example:

Displaying a list of open windows
When the user changes windows
Trapping mouse events 

 

Home Copyright and Disclaimer