Visual Basic Reference
Value Property Example
This example displays an HScrollBar (horizontal scroll bar) control's numeric value in a TextBox control. To try this example, paste the code into the Declarations section of a form that has a TextBox control and an HScrollBar control. Press F5 to run the program, and then click the scroll bar.
Private Sub Form_Load ()
HScroll1.Min = 0 ' Initialize scroll bar.
HScroll1.Max = 1000
HScroll1.LargeChange = 100
HScroll1.SmallChange = 1
End Sub
Private Sub HScroll1_Change ()
Text1.Text = Format (HScroll1.Value)
End Sub