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!

VScrollBar Class

Represents a standard Windows vertical scroll bar.

Object
   MarshalByRefObject
      MarshalByRefComponent
         Control
            RichControl
               ScrollBar
                  VScrollBar

[Visual Basic]
Public Class VScrollBar
   Inherits ScrollBar
[C#]
public class VScrollBar : ScrollBar
[C++]
public __gc class VScrollBar : public ScrollBar
[JScript]
public class VScrollBar 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 a VScrollBar.

[Visual Basic]

' Instantiate a VScrollBar.
Private VScrollBar1 as System.WinForms.VScrollBar

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

See Also

VScrollBar Members | System.WinForms Namespace | ScrollBar | HScrollBar