Havent used .NET in a while...forgetting everything :D i cant even get the keydown even :(
How can i detect CTRL+A key combo in a user control? (some other control inside the user control might have focus)
Printable View
Havent used .NET in a while...forgetting everything :D i cant even get the keydown even :(
How can i detect CTRL+A key combo in a user control? (some other control inside the user control might have focus)
You'd need to handle the KeyDown of each child control, probably all with the one method.CSharp Code:
if (e.Control && e.KeyCode == Keys.A)
hey thanks
I'm trying to use this on a list box to select all items
I'm kind of confused. After detecting CTRL+A i select all items in a listbox and then set e.Handled to true.... but if there is an item that starts with "A" in the listbox, it deselects everything and then only select the first item that starts with A
:confused:
shouldnt e.handled = true stop it from selecting the item whose text starts with 'A' ?
Is the KeyDown event being fired twice?