Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

ListView scrolling event

Posted on 2005-03-28
3
Medium Priority
?
240 Views
Last Modified: 2006-11-18
Hi,

I need to capture an event when my listview is scrolling, but i cant find one! How can it be done?

Thanks,
Michael
0
Comment
Question by:Xavior2K3
1 Comment
 
LVL 96

Accepted Solution

by:
Bob Learned earned 2000 total points
ID: 13644494
Create a new UserControl and inherit from ListView:

Public Class ListViewEx
  Inherits System.Windows.Forms.ListView

Define an event:
  Public Event VerticalScroll()

Override the window procedure to detect the scroll:

  Protected Overrides Sub WndProc(ByRef m As System.Windows.Forms.Message)

    Const WM_VSCROLL = &H115

    If m.Msg = WM_VSCROLL Then
      RaiseEvent VerticalScroll()
    End If

    MyBase.WndProc(m)

  End Sub

Bob
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Integration Management Part 2
Loops Section Overview
Suggested Courses

577 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question