要全局响应功能键,应该实现TApplicationEvent的OnMessage事件,如下面的过程
procedure TForm1.ApplicationEvents1Message(var Msg: tagMSG;
var Handled: Boolean);
begin
if Msg.message=WM_KeyDown then
if msg.wParam=vk_f1 then
begin
ShowMessage('AAAAAAAAAAAAAAA');
handled:=True;
end;
end;