1. Home
  2. Computing & Technology
  3. Delphi Programming

Hide a Process in the 'Close Program' Window

By , About.com Guide

This is the code that will hide a Delphi application in the Ctrl+Alt+Del menu!

Note: not in Win 2000 :(. For NT compatibile systems, check the "Big brother Delphi code toolkit"

~~~~~~~~~~~~~~~~~~~~~~~~~
implementation

const
   RSPSIMPLESERVICE = 1;
   RSPUNREGISTERSERVICE = 0;

function RegisterServiceProcess
   (dwProcessID, dwType: DWord) : DWord;
   stdcall; external 'KERNEL32.DLL';

procedure TForm1.FormDestroy (Sender: TObject) ;
begin
   RegisterServiceProcess
     (GetCurrentProcessID, RSPUNREGISTERSERVICE)
end;

procedure TForm1.FormCreate (Sender: TObject) ;
begin
   RegisterServiceProcess
     (GetCurrentProcessID, RSPSIMPLESERVICE)
end;
~~~~~~~~~~~~~~~~~~~~~~~~~

Delphi tips navigator:
» Does my CD-ROM drive contain an audio CD?
« The state of the Shift, Ctrl, Alt keys

Explore Delphi Programming
About.com Special Features

The Best Web Trends of the Decade

A look back at the best innovations, ideas and technologies over the last 10 years, More >

Family Tech Center

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

  1. Home
  2. Computing & Technology
  3. Delphi Programming
  4. Coding Delphi Applications
  5. Delphi Tips and Tricks
  6. 2000 Delphi Tips
  7. Hide a Process in the 'Close Program' Window

©2010 About.com, a part of The New York Times Company.

All rights reserved.