How to add a scroll bar to visual basic

Written by jaime avelar
  • Share
  • Tweet
  • Share
  • Pin
  • Email
How to add a scroll bar to visual basic
Add scroll bars using Visual Basic. (binary earth globes - green image by rgbspace from Fotolia.com)

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:
Easy

Other People Are Reading

Instructions

  1. 1

    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.

  2. 2

    Type the following inside your "Button1_Click" subroutine to show and enable the vertical scroll bar:

    Me.VerticalScroll.Visible = True

    Me.VerticalScroll.Enabled = True

  3. 3

    Type the following to show and enable the horizontal scroll bar:

    Me.HorizontalScroll.Enabled = True

    Me.HorizontalScroll.Visible = True

  4. 4

    Type the following to set "AutoScroll" to "True":

    Me.AutoScroll = True

    Press "F5" to run your program then click "Button1" to show scroll bars.

Don't Miss

Filter:
  • All types
  • Articles
  • Slideshows
  • Videos
Sort:
  • Most relevant
  • Most popular
  • Most recent

No articles available

No slideshows available

No videos available

By using the eHow.co.uk site, you consent to the use of cookies. For more information, please see our Cookie policy.