Example code:
Class MyListView: ListView
{
Public Event athandler HScroll;
Public Event athandler vscroll;
MyListView () {this.hscroll = New EventHandler (onHScroll); this.vscroll = new eventhandler (onvscroll);}
const int WM_HSCROLL = 0x0114; const int WM_VSCROLL = 0x0115; protected override void WndProc (ref Message m) {if (m.Msg == WM_HSCROLL) {OnHScroll (this, new EventArgs ());} else if (m.Msg = = Wm_vscroll) {ONVSCROLL (this, new eventargs ());
Base.WndProc (Ref M);
Virtual protected void onhscroll (Object sender, Eventargs e) {}
Virtual protected void onvscroll (Object sender, eventargs e) {}}