Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

send keypress with mouse event

Status
Not open for further replies.

woyler

Programmer
Jun 20, 2001
678
US
Hi All,
Anyone know how to mimic a keypress within the mousedown event? When the user left clicks the mouse on a listbox, I want to add a CTRL press with it.
 
Since the Ctrl key is only a modifier and doesn't fire an event, could the behavior you're looking for be as simple as setting the ListBox's SelectionMode property to MultiExtended?
 
Almost,
I am doing a touchscreen application that utilizes the listbox control. The user may select one or more items, sometimes in a consecutive order, sometimes not. I would like to have it so the user can drag down the list and select all items touched without having to touch/remove, touch /remove. The multiextended selection mode allows for this, but if they select items 1-10, then item 15, when they touch item 15 the previous items are then cleared. If the control key is depressed, it will select all items properly.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top