UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome Guest ( Log In | Register )

> Holding down a button while clicking...    
 
   
lukesb
post Aug 5 2008, 10:09 AM
Post #1

UtterAccess Veteran
Posts: 430
From: 01902 ENGLAND



Hi Everyone

Is there a way to tell if a user has held down, say the Ctrl key (I am assuming it will be pretty much the same whatever key I wish to trap for), when they have clicked on a control on a form..?

Cheers

Luke
Go to the top of the page
 
+
 
Start new topic
Replies (1 - 2)
MDM_Inc
post Aug 5 2008, 10:43 AM
Post #2

UtterAccess Addict
Posts: 116
From: Michigan, USA



On the 'Mouse Down' event there is a parameter called 'Shift' that contains the value of the key that was held down while the user mouse clicked.

Here's the text from the help page:
Shift The state of the SHIFT, CTRL, and ALT keys when the button specified by the Button argument was pressed or released. If you need to test for the Shift argument, you can use one of the following intrinsic constants as bit masks:
Constant Description
acShiftMask The bit mask for the SHIFT key.
acCtrlMask The bit mask for the CTRL key.
acAltMask The bit mask for the ALT key.


Alan
Go to the top of the page
 
+
lukesb
post Aug 5 2008, 10:59 AM
Post #3

UtterAccess Veteran
Posts: 430
From: 01902 ENGLAND



Nice one Alan, that's just what I needed...

Cheers mate

(IMG:http://www.utteraccess.com/forum/style_emoticons/default/thumbup.gif)
Go to the top of the page
 
+

Thank you for your support! Reply to this topicStart new topic

Jump To Forum:
 



RSS Go to Top  ·  Lo-Fi Version Time is now: 24th May 2013 - 08:39 PM