[View Borland Home Page][View Product List][Search This Web Site][View Available Downloads][Join Borland Online][Enter Discussion Area][Send Email To Webmaster]
Delphi Devsupport

Frequently Asked Questions

Hiding your application from the Windows Taskbar.

Question:

How do I hide my application from the Windows Taskbar?

Answer:

To do this you will need to:

  1. Select the View -> Project Source, from Delphi's main menu.
  2. Add the Windows unit to the uses clause.
  3. Add Application.ShowMainForm := False; to the line after "Application.Initialize;".
  4. Add: ShowWindow(Application.Handle, SW_HIDE); to the line before "Application.Run;" Your main project source file should now look something like this: program Project1; uses Windows, Forms, Unit1 in 'Unit1.pas' {Form1}, Unit2 in 'Unit2.pas' {Form2}; {$R *.RES} begin Application.Initialize; Application.ShowMainForm := False; Application.CreateForm(TForm1, Form1); Application.CreateForm(TForm2, Form2); ShowWindow(Application.Handle, SW_HIDE); Application.Run; end.
  5. In the "initialization" section (at the very bottom) of each unit that uses a form, add: begin ShowWindow(Application.Handle, SW_HIDE); end.

Back To Faq Index
Borland Online
Trademarks & Copyright © 1997 Borland International, Inc.