RELEASE MENUS

Size Window, Zoom Window

These commands change the size of a window from maximum to minimum or any specified size in between. This is the old FoxPro 2.x way of changing window size. We recommend you use a form's Height, Width and WindowState properties instead.

Usage

SIZE WINDOW WindowName TO nNewHeight, nNewWidth                        | BY nRowIncrement, nColumnIncrement ZOOM WINDOW WindowName          MIN [ AUTO ] | MAX | NORM         [ AT | FROM nTopRow, nLeftColumn         [ SIZE nNewHeight, nNewWidth           | TO nBottomRow, nRightColumn ] ]
The SIZE WINDOW command lets you resize any user-defined window or resizable FoxPro system window either to specified proportions or by specified increments. This command doesn't provide any functionality you can't get using ZOOM WINDOW NORM.

MIN minimizes the form. The AUTO keyword is only applicable to the DOS version of FoxPro 2.x, where it docks the form. MAX maximizes the form, within the limits of its parent window, or the Visual FoxPro application window. NORM is used for most of the rest of the keywords shown above, because it doesn't make much sense to try to position a zoomed form—it takes up the whole window. Similarly, a minimized form parks itself on the bottom of the window, regardless of where you tell it to be placed.

Some form windows are restricted in size by the MaxHeight and MaxWidth properties, as well as their counterparts MinHeight and MinWidth. Typically, no error is generated, but the window fails to be resized if these bounds are exceeded. For this reason, we recommend using the WindowState property to manipulate the windows rather than using this antiquated command.

ZOOM WINDOW MIN and MAX fire the form's Resize event and Refresh method, but ZOOM WINDOW NORM does not. This is another reason, in your authors' opinion, to manipulate WindowState rather than use this command.


Example

ACTIVATE WINDOW CALENDAR  && Open the calendar/diary ZOOM WINDOW CALENDAR ;   NORM AT 3,3 ;   SIZE 0,100  && Widen the diary

See Also

Height, Left, MaxHeight, MaxWidth, MinHeight, MinWidth, Resize, Top, Width, WindowState


View Updates

Copyright © 2002 by Tamar E. Granor, Ted Roche, Doug Hennig, and Della Martin. All Rights Reserved.



Hacker's Guide to Visual FoxPro 7. 0
Hackers Guide to Visual FoxPro 7.0
ISBN: 1930919220
EAN: 2147483647
Year: 2001
Pages: 899

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net