把代码帖出来,大家帮忙分析分析<br>interface<br>uses k22;<br>uses<br> Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,<br> Dialogs, ExtCtrls, StdCtrls, Menus;<br>type<br> TForm1 = class(TForm)<br> PopupMenu1: TPopupMenu;<br> N1: TMenuItem;<br> X1: TMenuItem;<br> procedure FormCreate(Sender: TObject);<br> procedure HotKeyDown(var Msg: Tmessage); message WM_HOTKEY;<br> private<br> { Private declarations }<br> public<br> { Public declarations }<br> end;<br><br>var<br> Form1: TForm1;<br> HotKeyId:Integer;<br><br><br>implementation<br><br>{$R *.dfm}<br><br><br><br>procedure TForm1.FormCreate(Sender: TObject);<br>begin<br>form1.Hide;<br>application.ShowMainForm:=false;<br>HotKeyId:=GlobalAddAtom('MyHotKey');<br>RegisterHotKey(Handle, hotkeyid, MOD_CONTROL, VK_F12);<br>end;<br><br>procedure TForm1.X1Click(Sender: TObject);<br>begin<br>AboutBox.showmodal;<br>end;<br><br>procedure TForm1.N1Click(Sender: TObject);<br>begin<br> UnRegisterHotKey(handle, HotKeyId);<br> application.Terminate;<br>end;<br><br>procedure TForm1.HotKeyDown(var Msg: Tmessage);<br>begin<br>if (Msg.LparamLo = MOD_CONTROL) AND (Msg.LParamHi = VK_F12) then <br>begin<br>Form1.PopupMenu1.Popup((screen.Width-form1.Width) div 2+250<br> ,(screen.Height-form1.Height) div 2 );<br>end;<br>end;<br><br><br><br>end.