Why is it impossible to copy the selected text to the TDBMemo component to the clipboard? DELPHI 7, Windows Vista. The following code fails to catch ctrl + c event, while ctrl + a works fine.
uses clipbrd;
procedure THierarchierForm.dbm1KeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
if (Key=Ord('A')) and (ssCtrl IN Shift) then begin
dbm1.SelectAll;
Key:=0;
end;
if (Key=Ord('C')) and (ssCtrl IN Shift) then begin
Clipboard.AsText:=dbm1.SelText;
Key:=0;
end;
end;
Thanx
source
share