How to detect : scrolling - up or down?

后端 未结 3 1914
独厮守ぢ
独厮守ぢ 2020-12-20 23:57

System.Windows.Forms.Form has only one scroll event-Scroll, but it is necessary to recognize scrolling up and scrollin

3条回答
  •  太阳男子
    2020-12-21 00:32

    private void dgv_Scroll(object sender, ScrollEventArgs e)
            {
                if (e.OldValue > e.NewValue)
                {
                    // here up
                }
                else
                {
                    // here down
                }
            }
    

提交回复
热议问题