Max, Min Properties (Scroll Bars)

See Also14GRZ97                 Example1JNHGJ0>Low

Apply To

Horizontal scroll bar1JSJOS7, vertical scroll bar1JSJOS7.


         Maxdetermines a scroll bar position's maximum Value5OIC88B 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).



[form.]{ hscrollbar|vscrollbar}.Max[ = limit ]

[form.]{ hscrollbar|vscrollbar}.Min[ = limit ]


For each property, you can specify an integer between -32,768 to 32,767, inclusive.  The default settings are:





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 SmallChange897H9LE 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


See Also


LargeChange, SmallChange Properties897H9LE


Programmer's Guide:

Chapter 3, "Creating and Using Controls"