本文整理自网络,侵删。
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 如何从一张图片中裁剪一部分距形图片另存为文件(使用canvas.copyrect)
Delphi strtofloat 将“字符型”转换成“浮点型”
Delphi 单击android上的web浏览器链接以启动Delphi应用程序
Delphi xe 如何实现("再按一次退出") 然后退出程序
Delphi中combobox.items.indexof用法
Delphi tscreen 类 - 通过 screen 更换光标
更多相关阅读请进入《Delphi》频道 >>