Top Property

Home Page (Objects)OverviewFAQReference

Applies to: Application object, TextWindow object, Window object

Gets or sets the y-coordinate of a window's top edge in pixels.

Syntax

object.Top [=value]

Parameters

object

An expression that evaluates to one of the objects in the Applies To list above. When you access the Top property of the Application object, you can omit object because the name of the Application object is implied when you access its properties and methods.

value

A Long that sets the y-coordinate of the window's top edge in pixels.

Remarks

The Top property has the Long type.

If object is the Application object, the Top property gets or sets the distance in pixels between the top edge of the screen and the main application window. If object is a Window object, the Top property gets or sets the distance in pixels between the top edge of the main application window and this window.

Note   Multiple Document Interface (MDI) child window coordinates are relative to the child window client area. (This area is inside the frame but does not include the docking sites.)

Example

The following example sets the top of the active window to 50:

ActiveWindow.Top = 50

See Also   Height property, Left property, Width property.