GetWindowRect method

Microsoft Visio Developer Reference

GetWindowRect method

   Example   

Gets the size and position of the client area of a window.

Version added

2000

Syntax

object.GetWindowRect pnLeft, pnTop, pnWidth, pnHeight

object

Required. An expression that returns a Window object.

pnLeft

Required Long. The coordinate of the left side of the window.

pnTop

Required Long. The coordinate of the top of the window.

pnWidth

Required Long. The distance in pixels from the left side to the right side of the window.

pnHeight

Required Long. The distance in pixels from the top to the bottom of the window.

Remarks

The GetWindowRect method gets the size and position of the client area of the window with respect to the window that owns the Windows collection to which it belongs. For the Windows collection of an Application object, the "with respect to" window is the MDICLIENT window of the Visio main window. For the Windows collection of a Window object, the "with respect to" window is the client area of the drawing window.