Yup, kode tersebut hanya berlaku untuk Windows 9.x.
Oleh karena itu penulis googling dan menemukan kode yang diinginkan di forum delphiarea.
Kodenya:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
procedure DisableCtrAltDel(Val: Boolean); | |
var | |
MyReg: TRegistry; | |
begin | |
Try | |
MyReg := TRegistry.Create; | |
with MyReg do | |
begin | |
RootKey := HKEY_CURRENT_USER; | |
OpenKey('\Software\Microsoft\Windows\CurrentVersion\Policies\System', True); | |
if Val then | |
WriteString('DisableTaskMgr', '1') | |
else | |
DeleteValue('DisableTaskMgr'); | |
CloseKey; | |
end; | |
Finally | |
MyReg.Free; | |
End; | |
end; | |
//--contoh pemanggilan prosedure | |
procedure TForm1.btn1Click(Sender: TObject); | |
begin | |
//disable | |
DisableCtrAltDel(True); | |
end; | |
procedure TForm1.btn2Click(Sender: TObject); | |
begin | |
//enable | |
DisableCtrAltDel(false); | |
end; |
Berhasil 'kan? YUP..
Terus bagaimana dengan kombinasi tombol yang lain? CTRL-ESC, ALT-TAB?
Solusinya? ya googling again.... atau tunggu tutorial berikut
No comments:
Post a Comment