核心提示:procedure TForm1.FormCreate(Sender: TObject);begin RegisterHotKey(Handle, IDHOT_SNAPDESKTOP, 0, VK_SNAPSHOT);end;procedure TForm1.FormClose(Sender: TO...
procedure TForm1.FormCreate(Sender: TObject);
begin
RegisterHotKey(Handle, IDHOT_SNAPDESKTOP, 0, VK_SNAPSHOT);
end;
procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);
begin
UnregisterHotKey(Handle, IDHOT_SNAPDESKTOP);
end;
procedure TForm1.FormActivate(Sender: TObject);
begin
RegisterHotKey (Handle, IDHOT_SNAPWINDOW, MOD_ALT, VK_SNAPSHOT);
end;
procedure TForm1.FormDeactivate(Sender: TObject);
begin
UnregisterHotKey(Handle, IDHOT_SNAPWINDOW);
end;