It's good to know how to enable scroll bars in your Microsoft Visual Basic.NET (VB.NET ) application, especially when you have users with lower screen resolution. VB.NET is a computer programming language developed by Microsoft that is fairly easy to learn and use. Scroll bars allow the user to scroll up and down or left to right on a Graphical User Interface (GUI) to view a form. In a few steps you can write VB.NET code to enable horizontal and vertical scrollbars in your VB.NET application.
- Skill level:
Start Microsoft Visual Basic 2010 Express and select the "File" menu then click "New Project..." Click "Windows Forms Application" and select "OK."
Double-click "Button" on the "Toolbox" menu to add a new button to your form. Double-click "Button1" to open the "Form1.vb" module.
Type the following inside your "Button1_Click" subroutine to show and enable the vertical scroll bar:
Me.VerticalScroll.Visible = True
Me.VerticalScroll.Enabled = True
Type the following to show and enable the horizontal scroll bar:
Me.HorizontalScroll.Enabled = True
Me.HorizontalScroll.Visible = True
Type the following to set "AutoScroll" to "True":
Me.AutoScroll = True
Press "F5" to run your program then click "Button1" to show scroll bars.
- 20 of the funniest online reviews ever
- 14 Biggest lies people tell in online dating sites
- Hilarious things Google thinks you're trying to search for