0 out of 1 rated this helpful - Rate this topic

ScrollBar.Value Property

Gets or sets a numeric value that represents the current position of the scroll box on the scroll bar control.

Namespace:  System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)
[<BindableAttribute(true)>]
member Value : int with get, set

Property Value

Type: System.Int32
A numeric value that is within the Minimum and Maximum range. The default value is 0.
ExceptionCondition
ArgumentOutOfRangeException

The assigned value is less than the Minimum property value.

-or-

The assigned value is greater than the Maximum property value.

The following example scrolls an image in a picture box. It uses the Value of the scrollbar to redraw a new part of the image whenever the user scrolls. This code example is part of a larger example provided for the ScrollBar class overview.

NoteNote

For instructions about how to run this example in Visual Studio, see How to: Compile and Run a Complete Windows Forms Code Example Using Visual Studio.

No code example is currently available or this language may not be supported.

.NET Framework

Supported in: 4.5.1, 4.5, 4, 3.5, 3.0, 2.0, 1.1, 1.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows Phone 8.1, Windows Phone 8, Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.