Window.GetWindowRect Method
Visio Automation Reference |
Gets the size and position of the client area of a window.
Version Information
Version Added: Visio 2000
Syntax
expression.GetWindowRect(pnLeft, pnTop, pnWidth, pnHeight)
expression A variable that represents a Window object.
Parameters
Name | Required/Optional | Data Type | Description |
---|---|---|---|
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. |
Return Value
Nothing
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 Microsoft Office Visio main window. For the Windows collection of a Window object, the "with respect to" window is the client area of the drawing window.
Example
The following example shows how to use the GetWindowRect method to get the size and position of a Window object. It opens the Pan & Zoom window and prints the window's coordinates, width, and height in the Immediate window.
Visual Basic for Applications |
---|
|
See Also