如果你是指在程序中屏蔽这两个快捷键,则需要向系统发送当前屏幕保护被激活的消息,这样,这些键均被屏蔽。具体的API函数调用如下:
procedure TForm1.FormCreate(Sender: TObject);
var
temp: Integer;
begin
SystemParametersInfo(SPI_SCREENSAVERRUNNING, 1, @temp, 0);
end;
procedure Form1.OnClose(Sender: TObject; var Action: TCloseAction);
var
temp: Integer;
begin
SystemParametersInfo(SPI_SCREENSAVERRUNNING, 0, @temp, 0);
end;
to disable windows key:
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
"Scancode Map"=hex:00,00,00,00,00,00,00,00,03,00,00,00,00,00,5b,e0,00,00,5c,e0,\
00,00,00,00
need reboot