Mega Code Archive

 
Categories / Delphi / System
 

Hiding from the Task Manager

Title: Hiding from the Task Manager Question: How do I prevent my program from being stopped by Ctrl-Alt-Del? Answer: UPDATE: Erwin Molendijk described a better technique in message ID783. Use it instead of that one. Simply use the function ShowWindowAsync, which functions mostly like ShowWindow but returns immediatly (instead of waiting for the target application to process the hide message). It has an interesting side-effect, as it removes the target window from the tasklist. Please note that this will only work on Windows 9x, and not on Windows NT. Example: ShowWindowAsync(Application.Handle, SW_HIDE); UPDATE: Erwin Molendijk described a better technique in message ID783. Use it instead of that one.