Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Don't show program in task bar 1

Status
Not open for further replies.

Roderich

Programmer
Sep 11, 2001
58
DE
hi there,

is there an easy way to blank out a program in the task bar ? I want to run a Delphi program in the background working as a message server, i.e. it has one form created which is not showing but just receiving and sending messages from/to other programs. Showing in the Windows task manager is no problem but we don't to have it visible inside the task bar.

Any hints, maybe anybody knows about a Delphi component doing this ?

best regards
Rod
 
Rod,

Add the following code to the OnCreate method of your application's main form:

Code:
   SetWindowLong( application.handle, GWL_EXSTYLE,
     GetWindowLong( application.handle, GWL_EXSTYLE )
     or WS_EX_TOOLWINDOW and not WS_EX_APPWINDOW );

Note: Some online sources claim you need to modify the project source to set Application.ShowMainForm to FALSE. In my testing, this is only necessary when creating applications that you don't want to immediately appear to the user, such those that run from the task tray, like Volume Control and others.

Hope this helps...

-- Lance
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top