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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Running a program as a tray icon

Status
Not open for further replies.

SilverWerewolf

Technical User
Aug 29, 2000
3
CA
I'm using Borland C++ version 3.0 (still...) And I want
to make an application that will keep itself in the tray
of the task bar.

How can this be accomplished using Builder 3.0 ?


The Silver Werewolf
 
OK, I'm dense, I admit it. What do you mean "make an application that will keep itself in the tray of the task bar." Do you want an application that starts minimized or one that cannot be removed, or ????

 
What I want to do is make the application run as a tray icon (like the task manager or the speaker icon, for example), instead of on the task bar itself, where it can be removed too easily. When a user double-clicks on the icon, I want the application dialog box to come up so the user can change settings in the program.

Thanks for any help you can supply

The Silver Werewolf
 
SilverWerewolf,

[tab]This is very doable in BCB 3 but it's a bit more involved than I can explain here. This is a small bit of a FAQ from BCBDEV's web site :

[tab]Programs don't actually minimize to the system tray. They simply hide their normal taskbar icon and add an icon to the system tray. You insert an icon in the system tray by calling the shell_NotifyIcon API function, or by using any one of the third party tray controls that are out there. You can hide your program's taskbar icon by calling the ShowWindow API function.

[tab]If you want your program to minimize to the system tray, create an OnMinimize event for the global TApplication object that hides the mainform of the program and hides that program's taskbar icon if it hasn't already been hidden. If you want your program to close to the system tray, then move the code into an OnClose handler.


[tab]You may want to go to their site at and look for FAQ "Create forms that miminize or close to the system tray." It also has some source code and examples.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top