Mega Code Archive

 
Categories / Delphi / Examples
 

Disable ctrl-alt-del and alt-tab

Issues: The program should be nice and small so it can load before a user can hit CTRL-ALT-DEL. Solution: Compile a single WIN32API call into a small .exe in delphi. Note: This was written for Delphi 2 (thus Unit name WINPROCS) and the code actually only works under Windows 3.x and 95/98. program small; {written by rleigh@deakin.edu.au (Richard Leigh, Deakin Univesity 1997} uses WinProcs; {$R *.RES} var Dummy : integer; begin Dummy := 0; {Disable ALT-TAB} SystemParametersInfo( SPI_SETFASTTASKSWITCH, 1, @Dummy, 0); {Disable CTRL-ALT-DEL} SystemParametersInfo( SPI_SCREENSAVERRUNNING, 1, @Dummy, 0); end.