By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,041 Members | 958 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,041 IT Pros & Developers. It's quick & easy.

not sendkey... HOLDKEY

P: n/a
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
Share this Question
Share on Google+
2 Replies


P: n/a

"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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.