type
TForm1 = class(TForm)
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
ID : Integer;
procedure WMHotKey(var Msg : TWMHotKey); message WM_HOTKEY;
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure do_SysKey;
begin
showmessage('你按下了 Alt + Shift + CapsLock 组合键');
end;
procedure TForm1.WMHotKey(var Msg : TWMHotKey);
begin
if msg.HotKey = ID then do_SysKey;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
if FindAtom('LihuaSoft2') = 0 then
begin
ID:=GlobalAddAtom(pchar('LihuaSoft2'))-$C000;
{ Alt + Shift + CapsLock 组合键 }
RegisterHotkey(Handle,ID,MOD_alt or mod_shift,$14);
end;
end;