用hook或许你用下面的registerhotkey的方法<br><br>public<br>procedure WMHotKey(var Message: TWMHOTKEY); message WM_HOTKEY;<br>....<br>procedure TForm1.FormCreate(Sender: TObject);<br>begin<br> RegisterHotKey(Handle, GlobalAddAtom('hotkey'), mod_alt, vk_F4);<br>end;<br>...<br>procedure TForm1.WMHotKey(var Message: TWMHOTKEY);<br>begin<br>//定义热键事件<br>end;<br>...<br>procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);<br>begin<br>UnregisterHotKey(Handle, GlobalAddAtom('hotkey'));<br>end;<br><br>