没有,delphi使用api函数来设置热键的。拷贝一下别人代码:--------------------------------------------把ALT+F4定义成自己程序的热键.参考以下代码:unit Unit1;interfaceuses Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs;type TForm1 = class(TForm) procedure FormCreate(Sender: TObject);
procedure FormClose(Sender: TObject;
var Action: TCloseAction);
private { Private declarations } procedure HotKeyDown(var Msg: Tmessage);
message WM_HOTKEY;
{ Private declarations } public { Public declarations } end;
var Form1: TForm1;
HotKeyId: Integer;implementation{$R *.DFM}procedure TForm1.FormCreate(Sender: TObject);
begin
HotKeyId := GlobalAddAtom('HotKey') - $C000;
RegisterHotKey(Handle, hotkeyid, Mod_Alt, VK_F4);
end;
procedure TForm1.FormClose(Sender: TObject;
var Action: TCloseAction);
begin
UnRegisterHotKey(handle, HotKeyId);
end;
procedure TForm1.HotKeyDown(var Msg: Tmessage);//热键处理程序。begin
if (Msg.LparamLo = Mod_Alt) And (Msg.LParamHi = VK_F4) then
begin
SHOWMESSAGE('AA');
end;
end;
end.