dedecting ctrl+mouseweel

A

Andrus

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.
 
M

michel.desangles

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top