delphi Edit,Memo中禁用Ctrl+V


本文整理自网络,侵删。

 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调用程序版本信息的方法

Delphi 实现卸载windows应用程序(类似360软件管家-卸载程序)

Delphi 检测用户超过多长时间没有操作键盘或鼠标

Delphi 泛型容器单元(generics.collections) tdictionary<t>

Delphi android应用程序的关闭退出

Delphi 采集功能代码getstr

Delphi代码变异加密工具

Delphi 组件篇 之 tbevel组件

Delphi webbrowser 加载html 将html代码转换成网页

Delphi获取盘符代码

更多相关阅读请进入《Delphi》频道 >>



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...