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!

Program in daemon mode?

Status
Not open for further replies.

gubak

Programmer
Mar 31, 2007
1
RS
Hi!

I have been debeloping in C++ Builder.
I want to develop an email alerter program for windows machine. This program will start at startup and every 5 seconds will ask the mail server for the new messages. If new message comes the email alerter program will start an animation.
I want it to run in daemon mode (work in background and listening new messages), but I have no idea how to do this. Maybe with an endless cycle? I think it's not very good idea.

Do you have any other idea how to develop a program to run in daemon mode?


Thank you
 
I can think of two ways off the top of my head. The first deals with making a Windows service that runs when the service threader starts.

The second is to run a program that is run from the startup then minimizes to the task bar or is hidden.

The second, IMHO, is easier since I've never successfully created a service.



James P. Cottingham
-----------------------------------------
I'm number 1,229!
I'm number 1,229!
 
The 5 sec. cycle is easily obtained, set at timer-component and make it trig every 5000ms and enable the timer. This way you can do the woodoo that you doo so well and if an e-mail comes along you start the animation.

Quite simple really.

And as 2ffat says: make it hidden or minimize to taskbar, start it minimized maybe?

Totte
Keep making it perfect and it will end up broken.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top