向系统注册Alt+F4热键,然后在代码里什么也不做,这样可以屏蔽全局的 Alt+F4:<br> private<br> { Private declarations }<br> HotKeyId: Integer;<br> procedure HotKeyDown(var Msg: Tmessage); message WM_HOTKEY; //热键消息响应<br><br>procedure TForm1.HotKeyDown(var Msg: Tmessage);<br>begin<br> if (Msg.LparamLo = Mod_Alt) And (Msg.LParamHi = VK_F4) then <br> begin<br> ; // 什么也不做,呵呵, 不写也行<br> end;<br>end;<br>procedure TForm1.FormCreate(Sender: TObject);<br>begin<br> HotKeyId := GlobalAddAtom('HotKey') - $C000;<br> RegisterHotKey(Handle, hotkeyid, Mod_Alt, VK_F4);<br>end;<br>procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);<br>begin<br> UnRegisterHotKey(handle, HotKeyId);<br>end;<br><br>