using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace TestScroll { public partial class Form1 : Form { public Form1() { InitializeComponent(); hScrollBar1.Maximum=10101; hScrollBar1.LargeChange=1000; hScrollBar1.SmallChange=200; } private void hScrollBar1_Scroll(object sender, ScrollEventArgs e) { if(e.Type ==ScrollEventType.EndScroll) { return; } int nNew = e.NewValue; int nOld = e.OldValue; Console.WriteLine(e.Type); Console.WriteLine(string.Format("{0}\t{1}", nNew, nOld)); } } }