You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
883 B
C#

1 month ago
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));
}
}
}