Bee Eee Blog

Getting the current state of keyboard and mouse.

by brian on Jan.09, 2008, under Uncategorized

Every once and a while I need to know whether the Control key is being pressed when I process a mouse event. And sometimes I need to know the mouse position when a key is hit. Of course the keyboard modifiers aren’t passed in mouse events and the mouse button state isn’t passed in the keyboard events.

No problem. For keyboard modifier state use these properties:

Control.ModifierKeys

For the mouse state use these properties:

Control.MouseButtons

Cursor.Position // this one you can set :)

Control.MousePosition
1 comment for this entry:
  1. MICHAEL


    CheapTabletsOnline.Com. Canadian Health&Care.Special Internet Prices.No prescription online pharmacy.Best quality drugs. No prescription drugs. Buy drugs online

    Buy:Levitra.Maxaman.Propecia.VPXL.Viagra Super Active+.Viagra Super Force.Cialis Professional.Viagra Soft Tabs.Tramadol.Cialis Super Active+.Zithromax.Cialis Soft Tabs.Viagra.Viagra Professional.Cialis.Soma.Super Active ED Pack….

Leave a Reply

You must be logged in to post a comment.

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...