not sendkey... HOLDKEY

  • Thread starter Thread starter Jesse
  • Start date Start date
J

Jesse

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!!
 
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?
 
Back
Top