I have a form with just a treeview on it. I am trying to add ctrl+a to select all nodes. Each time I press ctrl+a, I get an alert beep.
I have looked through EE and found multiple references to setting Key := Ord(#0); but that doesn't help.
Below is the KeyDown code that I am using.
procedure TForm1.TreeView1KeyDown(Sender: TObject; var Key: Word;
if (ssCTRL IN SHIFT) and ((Key = Ord('a')) or (Key = Ord('A')))then
// Do my selection stuff here.
Key := Ord(#0); // EE line to remove beep - doesn't work
Shift := Shift - [ssCTRL]; // I tried this to see if it would work too. Nope.