This property will be exposed as either a single scalar value that is one of the mcWindowPosition constants (mcwpMinimize if the window is minimized or mcwpMaximize) or as a LONGRECT (whenever the window is not maximized or minimized). Use the IsNumeric VB method to test for the single scalar value (see Example 4).
When exposed as a LONGRECT the values are the position rectangle of the window. The right, bottom coordinate is the pixel just past the rightmost, bottommost one occupied by the window (that is right minus left is the width of the window in screen pixels).
Coordinates of all top level windows (including popup dialogs) are exposed in coordinates relative to the upper left of the screen ("screen coordinates"). Coordinates of child windows (such as any McWindow object's MDI child window) are given relative to the upper left of their parent window's client area ("client coordinates"). The same rules apply on assignment, so coordinates returned from WindowPosition can later be assigned to achieve the same window postion.
On assignment, the assigning Variant can be a single scalar value that is one of the mcWindowPosition constants, or it can be a LONGPOINT or a length-2 array, or it can be a LONGRECT or a length-4 array.
If assigned a single scalar value, then mcwpMinimize will minimize the window, mcwpMaximize will maximize the window and mcwpRestore will restore it to its normal (un-minimized and un-maximized) position.
If assigned a LONGPOINT or a length-2 array then the window is first restored to its normal state if it is minimized or maximized, and then the left,top of the window is moved to the given x,y position, with its size left unchanged. Top level windows expect screen coordinates while child windows use "client coordinates".
If assigned a LONGRECT or a length-4 array then the window is first restored to its normal state if it is minimized or maximized, and then the window is moved and sized to the given left, top, right, bottom position. The right, bottom coordinate is the pixel just past the rightmost, bottommost one to be occupied by the window (that is right minus left is the width of the window in screen pixels) Top level windows expect screen coordinates while child windows use client coordinates.