?
Solved

ListView scrolling event

Posted on 2005-03-28
3
Medium Priority
?
239 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…

801 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