Bobby Oakes

Bobby Oakes

  • NA
  • 15
  • 14.9k

How Do i Allow the user to select specific items by clicking on them while the control key is pressed

Sep 12 2011 6:15 PM
I have a program that i need to be able to select multiple controls during runtime using the control key and a mouse click

How do i handle this event using keydown

it is a windows forms application containing 7 text boxes and a datagrid

i need the user to be able to use the control key as with many other applications to select individual controls at a time

Example: you have TextBox1 Textbox2 and so on

If the user only needs to copy individual contents to the clipboard they can hold down the control key on the keyboard and click the ones they need

I.E. If they need textbox1 and textbox4 only then they can hold the control key down and click on those two boxes or whatever boxes they need and copy the contents paste the contents cut the contents etc.

All i want to know is a simple and effective way to do this as it's used in most windows applications if someone knows a way other than the keydown event tell me i'll gladly take all solutions thanks



Thanks

Answers (4)