Delphi 通过按键 ESC 关闭程序


本文整理自网络,侵删。

 
procedure TForm1.FormCreate(Sender: TObject);
begin
   KeyPreview := true;
end;

procedure TForm1.FormKeyPress(Sender: TObject; var Key: Char);
begin
   if Key = #27 then Close;
end;

相关阅读 >>

Delphi lastdelimiter:在字符串中查找选定的字符最后出现的位置

Delphi源码一个对字符加密解密的实例

Delphi twebbrowser静音

Delphi 字符串查找函数

Delphi想tstringgrid中添加和删除行的方法

Delphi高亮显示trichedit当前行

Delphi 动态数组的释放

Delphi idftp ditdirectory未定义

Delphi 使用firedac tfdibbackup和tfdibrestore备份和还原firebird

Delphi 利用sendinput模拟鼠标键盘

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



打赏

取消

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

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

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

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

评论

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