Max, Min Properties (Scroll Bars)
See Also Example
Apply To
Horizontal scroll bar, vertical scroll bar
Description
Maxdetermines a scroll bar position's maximum Value property setting when the scroll box is in its bottommost position (vertical scroll bar) or rightmost position (horizontal scroll bar).
Mindetermines a scroll bar position's minimum Value property setting when the scroll box is in its topmost position (vertical scroll bar) or leftmost position (horizontal scroll bar).
Usage
[form.]{ hscrollbar|vscrollbar}.Max[ = limit ]
[form.]{ hscrollbar|vscrollbar}.Min[ = limit ]
Setting
For each property, you can specify an integer between -32,768 to 32,767, inclusive. The default settings are:
Max32,767.
Min0.
Remarks
The Windows environment automatically sets ranges for scroll bars proportional to the contents of forms, combo boxes, and list boxes. For a scroll bar control, however, you must specify these ranges. Use Max and Min to set a range appropriate to how the scroll bar control is usedfor 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 dynamicallyfor example, when adding records to a database that can be browsed with a scroll bar. 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 then set at the leftmost or topmost position of a horizontal or vertical scroll bar, respectively.
Data Type
Integer
Help:
LargeChange, SmallChange Properties
Programmer's Guide:
Chapter 3, "Creating and Using Controls"