ListView onScroll event

前端 未结 4 1429
小蘑菇
小蘑菇 2020-12-01 14:43

I’m programming one easy C# application, and i need onScroll event on Listview. So i created class ListviewEx witch inherits original ListView. I found how to detect scroll

4条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-01 15:36

    @Klinki

    Thank you for you cool contribution I think you forgot to handle horizontal scroll

    Case WM_HSCROLL
        Dim sargs As New ScrollEventArgs(ScrollEventType.EndScroll, GetScrollPos(Me.Handle, SB_HORZ))
                RaiseEvent OnScroll(Me, sargs)
                Exit Select
    

提交回复
热议问题