all groups > dotnet windows forms > july 2003 >
You're in the

dotnet windows forms

group:

How Do I Capture Mouse Wheel Movements?


How Do I Capture Mouse Wheel Movements? Tony Lin
7/31/2003 9:56:11 PM
dotnet windows forms:
I have a Microsoft wheel mouse. When focus is on a scrollable panel, I
would like to capture mouse wheel movement events to make the panel scroll
as the wheel is turned.



I don't see a mouse wheel event in the Windows.Forms.Control or panel
control.



Is there a way I can capture this in .NET?



Thanks.



Tony Lin

Fremont, CA



Re: How Do I Capture Mouse Wheel Movements? Tony Lin
8/1/2003 9:03:52 AM
Bob,

Got it! Thanks for your excellent advice again.

Tony


[quoted text, click to view]

Re: How Do I Capture Mouse Wheel Movements? Bob Powell [MVP]
8/1/2003 11:43:25 AM
Mouse wheel detents are in the Delta property of the MouseEventArgs. You
should be able to detect this through the mousemove event.

--
Bob Powell [MVP]
C#, System.Drawing

Check out the GDI+ FAQ
http://www.bobpowell.net/gdiplus_faq.htm

Buy quality Windows Forms tools
http://www.bobpowell.net/xray_tools.htm

New Tips and Tricks include creating transparent controls
and how to do double buffering.

[quoted text, click to view]

Re: How Do I Capture Mouse Wheel Movements? Herfried K. Wagner
8/1/2003 3:41:37 PM
Hello,

"Tony Lin" <tony@linfamily.org> schrieb:
[quoted text, click to view]

http://msdn.microsoft.com/library/en-us/cpref/html/frlrfSystemWindowsFormsControlClassOnMouseWheelTopic.asp

Regards,
Herfried K. Wagner
--
MVP · VB Classic, VB .NET
http://www.mvps.org/dotnet

AddThis Social Bookmark Button