471,310 Members | 1,273 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,310 software developers and data experts.

dedecting ctrl+mouseweel

I need to detect Ctrl+MouseWheel press in WinForms RichTextBox control to
save changed font size.

In
protected override void OnMouseWheel(MouseEventArgs e)

MouseEventArgs does not allow to dedect Ctrl key holding.

How to discover in OnMouseWheel event that Ctrl key is hold down when mouse
wheel is rotated ?

Andrus.

Aug 5 '08 #1
1 1529
On 5 août, 18:33, "Andrus" <kobrule...@hot.eewrote:
I need to detect *Ctrl+MouseWheel press in WinForms RichTextBox controlto
save changed font size.

In
* * * * protected override void OnMouseWheel(MouseEventArgs e)

MouseEventArgs does not allow to dedect Ctrl key holding.

How to discover in OnMouseWheel event that Ctrl key is hold down when mouse
wheel is *rotated ?

Andrus.
Use :

if (ModifierKeys == Keys.Control)
// do something...

Michel
Aug 5 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.