NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

HScrollBar Class

Represents a standard Windows horizontal scroll bar.

Object
   MarshalByRefObject
      MarshalByRefComponent
         Control
            RichControl
               ScrollBar
                  HScrollBar

[Visual Basic]
Public Class HScrollBar
   Inherits ScrollBar
[C#]
public class HScrollBar : ScrollBar
[C++]
public __gc class HScrollBar : public ScrollBar
[JScript]
public class HScrollBar extends ScrollBar

Remarks

Most controls that need scroll bars already provide them, and do not require this control. This is true of a multi-line System.WinForms.Edit 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 may be displayed in a control or utilized 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.

Requirements

Namespace: System.WinForms

Assembly: System.WinForms.dll

Example [Visual Basic]

The following example instantiates an HScrollBar.

[Visual Basic]

' Instantiate a HScrollBar.
Private HScrollBar1 as System.WinForms.HVScrollBar

Private Sub MySub()
   ' Initialize a new HScrollBar.
   Form1.HScrollBar1 = New System.WinForms.HScrollBar
   
   ' Set the Size and Location of the scroll bar.
   HScrollBar1.Size = New System.Drawing.Size(75,16)
   HScrollBar1.Location = New System.Drawing.Point(0,184)
   
   ' Add the scrollbar to the form.
   Form1.Controls.Add(HScrollBar1)
End Sub

See Also

HScrollBar Members | System.WinForms Namespace | ScrollBar | VScrollBar