本文整理自网络,侵删。
uses Clipbrd, ...
//disable CTRL + V ("Paste") :: handles Edit1.OnKeyDown
procedure TForm1.Edit1KeyDown(Sender: TObject; var Key: Word; Shift: TShiftState) ;
begin
if ((ssCtrl in Shift) AND (Key = ord('V'))) then
begin
if Clipboard.HasFormat(CF_TEXT) then ClipBoard.Clear;
Edit1.SelText := '"Paste" DISABLED!';
Key := 0;
end;
end;
相关阅读 >>
Delphi实现获取文件及文件夹大小(支持超过2g的大文件)
Delphi xe2 - 万一“获取程序自身大小的函数”改进版
Delphi 官方 processmessages 用法代码例子
更多相关阅读请进入《Delphi》频道 >>