473,324 Members | 2,400 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 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 1572
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 thread has been closed and replies have been disabled. Please start a new 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.