Mega Code Archive

 
Categories / Delphi / System
 

Hide application in Windows 2000

Title: Hide application in Windows 2000 Question: do you need to hide your applications from Windows 2000?... I've seen many approaches here, but none of them work good for W2K Answer: As far as I know there's no way to completly hide an application from Windows 2000, however you can hide from the task bar, and the Applications (on the Windows Task Manager), the only part where you cannot hide your application is from the Processes (anyone?) so... here's my approach, pretty much all the trick is done on the project source code, so open your project source code (Project | View source) and add the following: Program Gotcha; Uses Forms, MainFormU in 'MainFormU.pas' {MainForm}; {$R *.RES} Begin Application.Initialize; Application.ShowMainForm:=False; //This hides from the TaskBar Application.Title:=''; //This hides from the "Applications" Application.CreateForm(TMainForm, MainForm); MainForm.Visible:=False; //do this here!! not on the "OnCreate" Application.Run; End. as you can see, I just added: Application.ShowMainForm:=False; //This hides from the TaskBar Application.Title:=''; //This hides from the "Applications" and: MainForm.Visible:=False; //do this here!! not on the "OnCreate" (hides from TaskBar) that's it... but still, the form flicks a little bit when you start the application, to fix that set the Visible property of your main form to False on the object inspector this also works on Windows9X, but it doesn't hide it form the Ctrl-Alt-Del dialog... there's a bunch of articles for that here on Delphi3000, so you can combine the two, just by checking the version of the OS hope this helps! salu2 EberSys