Imports Infragistics.Win Imports Infragistics.Win.UltraWinScrollBar Private Sub ultraScrollBar1_ValueChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ultraScrollBar1.ValueChanged Dim scrollbar As UltraScrollBar = sender If scrollbar.Orientation = Orientation.Vertical Then Debug.WriteLine("Vertical scrollbar value changed:") Else Debug.WriteLine("Horizontal scrollbar value changed:") End If Debug.WriteLine("New Value: " + scrollbar.Value.ToString()) End Sub
using System.Diagnostics; using Infragistics.Win; using Infragistics.Win.UltraWinScrollBar; private void ultraScrollBar1_ValueChanged(object sender, System.EventArgs e) { UltraScrollBar scrollbar = sender as UltraScrollBar; if ( scrollbar.Orientation == Orientation.Vertical ) Debug.WriteLine( "Vertical scrollbar value changed:"); else Debug.WriteLine( "Horizontal scrollbar value changed:"); Debug.WriteLine( "New Value: " + scrollbar.Value.ToString()); }