![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
|
Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
br> br> |
| |||||||
![]() |
| | Thread Tools | Display Modes |
| | #1 (permalink) |
| Guest | 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) |
| Guest | 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) |
| Guest | 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 | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Switching keyboard language using grave accent and German keyboard | BiGGA | Vista General | 5 | 08-01-2007 06:06 PM |
| WMI event - Failed to start event | Pav | PowerShell | 3 | 05-09-2007 06:48 PM |
| Windows Event Log fails to translate event description. | Deepak Jha | Vista General | 0 | 12-15-2006 06:30 AM |
| Event Log Event ID 18212 errors | Jerry Witalka | Vista General | 0 | 08-26-2006 02:13 PM |
| Unable to fetch the Event Log - Event Description | Vineet Das | Vista security | 4 | 08-24-2006 01:52 AM |