![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
| |
| | #1 (permalink) |
| | keyboard state during MouseWheel event I want my app to scale using strg+mousewheel, just like Outlook or IE. It is quite simple to hook into the PreviewMouseWheel to get the event, but how do I check if ctrl is pressed down during the wheel event? Sam |
My System Specs![]() |
| | #2 (permalink) |
| | Re: keyboard state during MouseWheel event Sam Jost wrote: > I want my app to scale using strg+mousewheel, just like Outlook or IE. > > It is quite simple to hook into the PreviewMouseWheel to get the > event, but how do I check if ctrl is pressed down during the wheel > event? You can check the static Keyboard::Modifiers property[1]. Although you might be able to find a more friendly way do this in WPF friendly using a MouseGesture[2]. HTH, Drew [1] http://windowssdk.msdn.microsoft.com..._Modifiers.asp [2] http://windowssdk.msdn.microsoft.com...useGesture.asp ___________________________________ Drew Marsh Chief Software Architect Mimeo.com, Inc. - http://www.mimeo.com Microsoft C# / WPF MVP Weblog - http://blog.hackedbrain.com/ |
My System Specs![]() |
| | #3 (permalink) |
| | Re: keyboard state during MouseWheel event Thanks, ((Keyboard.Modifiers & ModifierKeys.Control) == ModifierKeys.Control)) does work like I want it to. Mouse gesture sounds intriguing, but I found no way to check for turning the mouse wheel in there, only for mouse click. Since I want to scale using the same way as outlook or IE I don't want to use ctrl+mouse movement, or something. Thanks a lot, Sam Drew Marsh schrieb: > Sam Jost wrote: > > > I want my app to scale using strg+mousewheel, just like Outlook or IE. > > > > It is quite simple to hook into the PreviewMouseWheel to get the > > event, but how do I check if ctrl is pressed down during the wheel > > event? > > You can check the static Keyboard::Modifiers property[1]. Although you might > be able to find a more friendly way do this in WPF friendly using a MouseGesture[2]. > > HTH, > Drew > > [1] http://windowssdk.msdn.microsoft.com..._Modifiers.asp > [2] http://windowssdk.msdn.microsoft.com...useGesture.asp > > ___________________________________ > Drew Marsh > Chief Software Architect > Mimeo.com, Inc. - http://www.mimeo.com > Microsoft C# / WPF MVP > Weblog - http://blog.hackedbrain.com/ |
My System Specs![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| event ID 3002 on tcp.sys integrity and event ID 10 on WMI sesclu | Vista General | |||
| HELP need to solve this problem asap - Unable to start event viewer/event log service | Software | |||
| Boot up Issues - Critical Event Log errors - Event ID = 100, 200, 400, 307, 402 | General Discussion | |||
| mousewheel.ocx | Software | |||
| Windows Event Log fails to translate event description. | Vista General | |||