Provides data for the System.WinForms.ScrollBar.Scroll event.
Object
EventArgs
ScrollEventArgs
[Visual Basic] Public Class ScrollEventArgs Inherits EventArgs [C#] public class ScrollEventArgs : EventArgs [C++] public __gc class ScrollEventArgs : public EventArgs [JScript] public class ScrollEventArgs extends EventArgs
[To be supplied.]
Namespace: System.WinForms
Assembly: System.WinForms.dll
The following example creates an event handler for the System.WinForms.ScrollBar.Scroll event and displays the value of the scroll bar in a label every time the System.WinForms.ScrollEventArgs.Scroll event is raised. This code assumes that a Label and a VScrollBar have been instantiated on a form.
[Visual Basic]
Private Sub MySub() ' Add an event handler for the Scroll event. VScrollBar1.AddOnScroll New System.WinForms.ScrollEventHandler _ (AddressOf Me.VScrollBar1_Scroll) End Sub ' Scroll event handler. Private Sub VScrollBar1_Scroll(ByVal sender As System.Object, ByVal e As System.WinForms.ScrollEvent) ' Display the new value in the label. Label1.Text = "VScrollBar Value:(Scroll Event) " & CStr(VScrollBar1.Value) End Sub