Detecting the Mouse Wheel on a ListView Control
-
Has anyone figured out how to detect the movement of the mouse wheel when the mouse is over a listview control?
Darryl Borden Principal IT Analyst dborden@eprod.com
-
Has anyone figured out how to detect the movement of the mouse wheel when the mouse is over a listview control?
Darryl Borden Principal IT Analyst dborden@eprod.com
You can create your own class that derives from ListView, override WndProc and catch WM_MOUSEWHEEL to raise an event and/or handle it directly there. [edit] WM constants[^]
Dave
BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia) -
Has anyone figured out how to detect the movement of the mouse wheel when the mouse is over a listview control?
Darryl Borden Principal IT Analyst dborden@eprod.com
You can directly and eventhandler Mouse_Wheel (sth like that) to the listview you use.
-
Has anyone figured out how to detect the movement of the mouse wheel when the mouse is over a listview control?
Darryl Borden Principal IT Analyst dborden@eprod.com
Seraph_summer is correct - for some reason MS have hidden it from the designer but it's available in the editor. I'll check the source later and see if I can figure out why!
listView1.MouseWheel += new MouseEventHandler(listView1_MouseWheel);
void listView1_MouseWheel(object sender, MouseEventArgs e)
{
// Do stuff!
}Dave
BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)