unit Unit1;<br><br>interface<br><br>uses<br> Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs;<br><br>type<br> TForm1 = class(TForm)<br> procedure FormCreate(Sender: TObject);<br> procedure FormClose(Sender: TObject; var Action: TCloseAction);<br> private<br> procedure WMHotKey(var msg:Tmessage);message WM_hotkey;<br> { Private declarations }<br> public<br> { Public declarations }<br> end;<br><br>var<br> Form1: TForm1;<br><br>implementation<br><br>{$R *.DFM}<br><br>procedure TForm1.FormCreate(Sender: TObject);<br>begin<br> registerhotkey(form1.handle,1,mod_alt,vk_f10);<br>end;<br><br>procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);<br>begin<br> unregisterhotkey(form1.handle,1);<br>end;<br><br>procedure TForm1.WMHotKey;<br>begin<br> application.restore ;<br>end;<br><br>end.<br><br>menxin:要分吗?<br>