Returns or sets the smallest and largest font sizes displayed in the Size list box of the Font Common Dialog.
The Max property also returns or sets a scroll bar position's maximum Value property setting when the scroll box is in its bottom or rightmost position.
The Min property also returns or sets a scroll bar position's minimum Value property setting when the scroll box is in its top or leftmost position.
object.Max [= value]
object.Min [= value]
The parts of the Max and Min property syntaxes are described in the following table.
Part | Description |
---|---|
object | An object expression that evaluates to an object. |
value | A numeric expression specifying the maximum or minimum Value property setting, as described in Settings. |
For each property, you can specify an integer between -32,768 and 32,767, inclusive. The default settings are:
The Microsoft Windows CE operating environment automatically sets ranges for scroll bars proportional to the contents of forms, ComboBox controls, and ListBox controls. For a scroll bar (HScrollBar or VScrollBar) control, however, you must specify these ranges. Use Max and Min to set a range appropriate to how the scroll bar control is used — for example, as an input device or as an indicator of speed or quantity.
Typically, you set Max and Min at design time. You can also set them in code at run time if the scrolling range must change dynamically — for example, when adding records to a database that can be scrolled through. You set the maximum and minimum scrolling increments for a scroll bar control with the LargeChange and SmallChange properties.
Note If Max is set to less than Min, the maximum value is set at the leftmost or topmost position of a horizontal or vertical scroll bar, respectively.