VB.Net - ScrollBars Control

The horizontal and vertical scrollbars which the user can use to move content into view.

vb.net-scrollbars.jpg

Most of the controls that use scrollbars come with them built in, such as multiline text boxes, combo boxes etc. You can set the Value property yourself in code, which moves the scroll box to match. The controls Value property gets and sets its current numeric value.

The Minimum and Maximum properties determine the range of values that the control can display. The following VB.Net program shows a TextBox control with scrollbars.

Public Class Form1

  Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

    TextBox1.Multiline = True

    TextBox1.ScrollBars = ScrollBars.Both

  End Sub

End Class

Next Post Previous Post
No Comment
Add Comment
comment url