Windows Vista Forums
Vista Forums Home Join Vista Forums Donate Vista Tutorials Tags

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.
Register at Vista forums...the world biggest Windows Vista resource Join Vista Forums Now

Go Back   Vista Forums > Microsoft Technical Newsgroups > Avalon

keyboard state during MouseWheel event

Update your Vista Drivers Update Your Drivers Now!!
Closed Thread
 
Thread Tools Display Modes
Old 05-02-2006   #1 (permalink)
Sam Jost
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 SpecsSystem Spec
Old 05-02-2006   #2 (permalink)
Drew Marsh
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 SpecsSystem Spec
Old 05-03-2006   #3 (permalink)
Sam Jost
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 SpecsSystem Spec
Closed Thread

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


Vistax64.com is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media 2005-2008

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51