System Delphi

Title: Disabling Ctrl+Alt+Delete under Windows XP?
Question: How can I disable Ctrl+Alt+Delete under Windows XP?
Answer:
procedure DisableCtrAltDel(Val: Boolean);
var
MyReg: TRegistry;
begin
MyReg := TRegistry.Create;
with MyReg do
begin
RootKey := HKEY_CURRENT_USER;
OpenKey('\Software\Microsoft\Windows\CurrentVersion\Policies\System', True);
if Val then
reg.WriteString('DisableTaskMgr', '1')
else
reg.DeleteValue('DisableTaskMgr');
reg.CloseKey;
end;
end;
// To enable Ctr+Alt+Del:
procedure TForm1.Button1Click(Sender: TObject);
begin
DisableCtrAltDel(True);
end;
// To disable Ctr+Alt+Del:
procedure TForm1.Button1Click(Sender: TObject);
begin
DisableCtrAltDel(False);
end;