Represents a standard Windows horizontal scroll bar.
<ClassInterfaceAttribute(ClassInterfaceType.AutoDispatch)> _ <ComVisibleAttribute(True)> _ Public Class HScrollBar _ Inherits ScrollBar
Dim instance As HScrollBar
[ClassInterfaceAttribute(ClassInterfaceType.AutoDispatch)] [ComVisibleAttribute(true)] public class HScrollBar : ScrollBar
[ClassInterfaceAttribute(ClassInterfaceType::AutoDispatch)] [ComVisibleAttribute(true)] public ref class HScrollBar : public ScrollBar
public class HScrollBar 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 HScrollBar and adds it to a Form.
Private Sub InitializeMyScrollBar() ' Create and initialize an HScrollBar. Dim hScrollBar1 As New HScrollBar() ' Dock the scroll bar to the bottom of the form. hScrollBar1.Dock = DockStyle.Bottom ' Add the scroll bar to the form. Controls.Add(hScrollBar1) End Sub 'InitializeMyScrollBar
private void InitializeMyScrollBar() { // Create and initialize an HScrollBar. HScrollBar hScrollBar1 = new HScrollBar(); // Dock the scroll bar to the bottom of the form. hScrollBar1.Dock = DockStyle.Bottom; // Add the scroll bar to the form. Controls.Add(hScrollBar1); }
private: void InitializeMyScrollBar() { // Create and initialize an HScrollBar. HScrollBar^ hScrollBar1 = gcnew HScrollBar; // Dock the scroll bar to the bottom of the form. hScrollBar1->Dock = DockStyle::Bottom; // Add the scroll bar to the form. Controls->Add( hScrollBar1 ); }
function InitializeMyScrollBar(){ // Create and initialize an HScrollBar. var hScrollBar1 : HScrollBar = new HScrollBar() // Dock the scroll bar to the bottom of the form. hScrollBar1.Dock = DockStyle.Bottom // Add the scroll bar to the form. Controls.Add(hScrollBar1) }
Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98, Windows CE, Windows Mobile for Smartphone, Windows Mobile for Pocket PC