我认为程序更应该这样写:<br>unit Unit1;<br><br>interface<br><br>uses<br> Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,<br> Dialogs, StdCtrls, Buttons;<br><br>type<br> TForm1 = class(TForm)<br> BitBtn1: TBitBtn;<br> procedure BitBtn1Click(Sender: TObject);<br> private<br> procedure GetHotkey(var Msg : TWMHOTKEY);message WM_HOTKEY;<br> public<br> { Public declarations }<br> end;<br><br>var<br> Form1: TForm1;<br><br>implementation<br><br>{$R *.dfm}<br><br>procedure TForm1.GetHotKey(var Msg : TWMHOTKEY);<br>begin<br> if Msg.HotKey = $DDDDDD then<br> begin<br> showmessage('press');<br> Msg.Result := 1;<br> end;<br>end;<br><br>procedure TForm1.BitBtn1Click(Sender: TObject);<br>begin<br> RegisterHotkey(handle,$DDDDDD,MOD_CONTROL or MOD_Alt, VK_F3);<br>end;<br><br>end.