ex.hlp (Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
LargeChange and SmallChange Properties Example
                        Example                Contents  Index  Back
──────────────────────────────────────────────────────────────────────────────
' This example uses a scroll bar to move a picture box control across a form.
 
' To try this example:
' 1. Choose New Project from the File menu
' 2. Choose New Form from the File menu to create a form with:
'    • Picture box
'    • Horizontal scroll bar
' 3. Press Alt+F4 to return to the programming environment
' 4. Copy the code example below to the form module
' 5. Press F5 to run the example
 
 SUB Form_Load ()
    HScroll1.Max = 100               ' Set maximum value
    HScroll1.LargeChange = 20        ' Cross in 5 clicks
    HScroll1.SmallChange = 5         ' Cross in 20 clicks
    Picture1.Left = 0                ' Start picture at left
    Picture1.BackColor = 3           ' Set color of picture box
 END SUB
 
 SUB HScroll1_Change ()
    ' Move picture according to scroll bar.
    Picture1.Left = (HScroll1.Value / 100) * ScaleWidth
 END SUB