- 1
Open Microsoft Visual Basic Express and select "New Project..." from the left pane of your screen. Click "Windows Forms Application" under "Installed Templates." Select "OK."
- 2
Double-click "Button" on the "Toolbox" menu to add a button to your form. Double-click "Button1" to open the "Form1.vb" module. Press "Ctrl" and "A" to select all code and press "Delete" to remove all existing code.
- 3
Copy and paste the following code to enable the vertical scroll bar and horizontal scroll bars on your Form:
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Me.VerticalScroll.Visible = True
Me.VerticalScroll.Enabled = True
Me.HorizontalScroll.Enabled = True
Me.HorizontalScroll.Visible = True
Me.AutoScroll = True
End Sub
End Class
- 4
Run your program by pressing "F5," then click "Button1" to load and show scroll bars.
5/11/11
How to Load Bars in Visual Basic
Knowing how to enable and load scroll bars in your Microsoft Visual Basic.NET (VB.NET) application can make your application more user-friendly. VB.NET is a computer programming language used to develop Windows applications. Different screen resolutions can limit the user on viewing all the controls on a Graphical User Interface (GUI). You can enable vertical and horizontal bars to your application GUI.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment