473,320 Members | 1,722 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

not sendkey... HOLDKEY

Is there a way to HOLD a key down programatically?

I have a listbox that I want to behave as though the user is holding down
the CTRL key, so they get a certain behavior w/ regard to multiselecting
items in the list.

So I would like to have the CTRL key held down (in code) for the duration of
the existence of the form.

Is this possible?

(I already know I can use SendKeys to send a CTRL along with other keys.
The problem with this is that the user will be clicking the list with the
mouse, so using SendKeys would require that there be a KeyCode for
"LeftMouseClick", which I don't think exists.)

THANKS!!
Nov 20 '05 #1
2 1402

"Jesse" <ja******@cascodev.com> wrote in message
news:%2*****************@TK2MSFTNGP12.phx.gbl...
Is there a way to HOLD a key down programatically?

I have a listbox that I want to behave as though the user is holding down
the CTRL key, so they get a certain behavior w/ regard to multiselecting
items in the list.

So I would like to have the CTRL key held down (in code) for the duration of the existence of the form.


Why not just set the SelectionMode to MultiSimple?
Nov 20 '05 #2
using infragistics grid. no 'multisimple' mode.
"Jeff Johnson [MVP: VB]" <i.***@enough.spam> wrote in message
news:u2**************@TK2MSFTNGP11.phx.gbl...

"Jesse" <ja******@cascodev.com> wrote in message
news:%2*****************@TK2MSFTNGP12.phx.gbl...
Is there a way to HOLD a key down programatically?

I have a listbox that I want to behave as though the user is holding down the CTRL key, so they get a certain behavior w/ regard to multiselecting
items in the list.

So I would like to have the CTRL key held down (in code) for the
duration of
the existence of the form.


Why not just set the SelectionMode to MultiSimple?

Nov 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: baileystuff | last post by:
I have an issue where I have three Cases that SHOULD act the same but don't. If you look at the code below you will see that the general premise is to open a MSWord template and then use SendKey...
0
by: Alexander Ovchinnikov | last post by:
Hi All! Is it Possible to send some kind of string from Windows Service to IIS application so the latter can get info through javascript function String.fromCharCode( window.event.keyCode ). I'm...
0
by: angelsoft | last post by:
How to send Microsoft Natural Keyboard keys with sendkey method ej. Windows Logo: Start menú, Windows Logo+R: Run dialog box
0
by: Gunawan | last post by:
Can someone help me how to write console application to sendkey c:>sendkey {ALT}+{TAB} simulate key ALT+TAB TIA Gun
7
by: JV | last post by:
I am running a large Access 2000 application (installed using Access Runtime) that uses many VB SendKeys, primarily to expand combo boxes On Enter. When trying to run it on Vista I get a...
2
by: kru | last post by:
Hi All, Simple question yet I can't figure it out. I need to send the TAB key to an external application. It is able to send {ENTER} etc yet no luck with the {TAB}. I have tried the...
12
by: DAHMB | last post by:
I have a form that calls up a report in the form I have several date fields that have date input masks. I have created a cancel button as: Private Sub btnCancel_Click() On Error GoTo...
0
by: ngeluis | last post by:
Hello every one.. Im having problems to send a command to Windows - Run... I want to send a command to Windows - Run to the people only have to press the Enter Key... The text that i want to...
1
by: John Dio | last post by:
I am trying to create a on screen key board. I simply want to send a key (Simulate the keyboard) to a combo box using the Handle of the control. The below code is not working
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.