Description



You can use the Size Master Control (Sizer) to limit the minimum and maximum size and shape for any of your forms.  The control has properties for minimum and maximum tracking size, and maximized window size and position.  For example, by fixing the minimum tracking width, a user will be unable to resize the form smaller than the specified limit.  When installed on the form, the Sizer enforces its limits on the window size during both run and design mode.

All dimensions are in Twips.



Any property set to 0 is disabled, and will not affect the window dimensions.  The dimensions can be fixed at design time, and also changed at run time.

The Sizer is invisible at run time, and its position on the form is irrelevant.



File Name



SIZER.VBX



Remarks



You must have only one Sizer control per form.  The Sizer control applies its limits to the form on which it is placed, through processing the WM_GETMINMAXINFO messages.

If you place more than one Sizer on a form, you will be told that it is not being used, and must be removed.  You should then remove it immediately to avoid future errors.

The minimum tracking dimensions should not exceed the maximum tracking settings.  An error will be generated if you should change a setting such that an enabled maximum is less than a minimum.



Note:



Whenever tracking dimensions are changed, the window is resized to its current size and position.  If maximum or minimum limits apply, the window size will change accordingly.

