SetWindowLocation Method

Sets the window's size and location in terms of percentage of the screen.

Syntax

object.SetWindowLocation lfTopPct, lfLeftPct, lfHeightPct, lfWidthPct, [bRedraw], [bDesiredLocation], [bClampWindow]

Properties

The SetWindowLocation method syntax has these parts:

Part

Description

object

An object expression that evaluates to an object in the Applies To list.

LfTopPct

Double. The top percentage of the window relative to the WorkSpace client area.

LfLeftPct

Double. The left percentage of the window relative to the WorkSpace client area.

LfHeightPct

Double. The percentage of horizontal screen space.

LfWidthPct

Double. The percentage of vertical screen space.

bRedraw

Boolean. (Optional)
True
– Redraw the document. (default)
False
– Set the position without redrawing the document.

bDesiredLocation

Boolean. (Optional)
True
– Location is written to disk.
False
– Location is not written to disk. (default)

bClampWindow

Boolean. (Optional)
True
– Sizes the document to the size of the viewport.
False
– Does not resize the document. (default)

Remarks

The lfTopPct parameter sets the window's location relative to the WorkSpace's MDI Client area origin and the lfLeftPct parameter sets the window's location relative to the absolute screen resolution's origin.

Calling the SetWindowLocation will not alter the location of the document that is saved to disk. To alter the window location that is saved to disk, set the WindowHeightPercentage, WindowLeftPercentage, WindowTopPercentage, and WindowWidthPercentage properties.

 

Example

Applies To