VScrollBar Class
Assembly: System.Windows.Forms (in system.windows.forms.dll)
'Declaration <ComVisibleAttribute(True)> _ <ClassInterfaceAttribute(ClassInterfaceType.AutoDispatch)> _ Public Class VScrollBar Inherits ScrollBar 'Usage Dim instance As VScrollBar
/** @attribute ComVisibleAttribute(true) */ /** @attribute ClassInterfaceAttribute(ClassInterfaceType.AutoDispatch) */ public class VScrollBar extends ScrollBar
ComVisibleAttribute(true) ClassInterfaceAttribute(ClassInterfaceType.AutoDispatch) public class VScrollBar extends ScrollBar
Most controls that need scroll bars already provide them and do not require this control. This is true of a multiline TextBox control, a ListBox, and a ComboBox, for example.
You can use this control to implement scrolling in containers that do not provide their own scroll bars such as a PictureBox or for user input of numeric data. The numeric data can be displayed in a control or used in code. The Minimum and Maximum properties determine the range of values the user can select. The LargeChange property determines the effect of clicking within the scroll bar but outside the scroll box. The SmallChange property determines the effect of clicking the scroll arrows at each end of the control.
The following example creates and initializes a VScrollBar and adds it to a Form.
Private Sub InitializeMyScrollBar() ' Create and initialize a VScrollBar. Dim vScrollBar1 As New VScrollBar() ' Dock the scroll bar to the right side of the form. vScrollBar1.Dock = DockStyle.Right ' Add the scroll bar to the form. Controls.Add(vScrollBar1) End Sub
private void InitializeMyScrollBar()
{
// Create and initialize a VScrollBar.
VScrollBar vScrollBar1 = new VScrollBar();
// Dock the scroll bar to the right side of the form.
vScrollBar1.set_Dock(DockStyle.Right);
// Add the scroll bar to the form.
get_Controls().Add(vScrollBar1);
} //InitializeMyScrollBar
System.MarshalByRefObject
System.ComponentModel.Component
System.Windows.Forms.Control
System.Windows.Forms.ScrollBar
System.Windows.Forms.VScrollBar
Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.