Board index » cppbuilder » timer application

timer application


2005-05-10 10:15:43 AM
cppbuilder94
Hello:
I want to write an application which will be started at windows startup and
then always be running. It is supposed to start another application at
regular intervals of about 30 minutes. So this application, even when
minimized, should have timer activity going on.
Also may be when minimized, it goes on the system tray.
Can somebody help me please.
Thanks,
Sudesh
 
 

Re:timer application

"Sudesh" < XXXX@XXXXX.COM >wrote in message
Quote

I want to write an application which will be started at windows
startup and
then always be running. It is supposed to start another application
at
regular intervals of about 30 minutes. So this application, even
when
minimized, should have timer activity going on.
Also may be when minimized, it goes on the system tray.
Just use a TTimer with an interval of 1800000.
For the tray ability, I'd use the tray symbol component from the
TurboPower ShellShock suite.
sourceforge.net/projects/tpshellshock/
HTH
Jonathan
 

Re:timer application

Thanks Jonathan
Can you please tell me how do I write without using TPShellShcok?
Sudesh
"Jonathan Benedicto" < XXXX@XXXXX.COM >wrote in message
Quote
"Sudesh" < XXXX@XXXXX.COM >wrote in message
news: XXXX@XXXXX.COM ...
>
>I want to write an application which will be started at windows startup
>and
>then always be running. It is supposed to start another application at
>regular intervals of about 30 minutes. So this application, even when
>minimized, should have timer activity going on.
>Also may be when minimized, it goes on the system tray.

Just use a TTimer with an interval of 1800000.

For the tray ability, I'd use the tray symbol component from the
TurboPower ShellShock suite. sourceforge.net/projects/tpshellshock/

HTH

Jonathan

 

{smallsort}

Re:timer application

"Sudesh" < XXXX@XXXXX.COM >wrote in message
Quote
Can you please tell me how do I write without using TPShellShcok?
You'll have to program the tray icon manually. Look at the
Shell_NotifyIcon() function in the Win32 API.
Gambit
 

Re:timer application

Thanks Gambit.
So I use TTimer and Shell_NotifyIcon() correct??
Any special care to be taken?
Thanks again,
Sudesh
Quote
>Can you please tell me how do I write without using TPShellShcok?

You'll have to program the tray icon manually. Look at the
Shell_NotifyIcon() function in the Win32 API.


Gambit


 

Re:timer application

Hello:
Another question:
If I have to run the external application at some specified time(s) (10am,
2pm, 3pm, 8pm...) rather than specified intervals then how do I go?
I have to keep TTimer interval 1 second or may be 500 ms and then compare
time at each firing and check?
Thanks,
Sudesh
"Remy Lebeau (TeamB)" < XXXX@XXXXX.COM >wrote in message
Quote

"Sudesh" < XXXX@XXXXX.COM >wrote in message
news: XXXX@XXXXX.COM ...

>Can you please tell me how do I write without using TPShellShcok?

You'll have to program the tray icon manually. Look at the
Shell_NotifyIcon() function in the Win32 API.


Gambit


 

Re:timer application

In article < XXXX@XXXXX.COM >, XXXX@XXXXX.COM
says...
Quote
Hello:

Another question:
If I have to run the external application at some specified time(s) (10am,
2pm, 3pm, 8pm...) rather than specified intervals then how do I go?
I have to keep TTimer interval 1 second or may be 500 ms and then compare
time at each firing and check?

Thanks,
Sudesh
I have a program wich is doing about the same thing, and TTimer is set
at 60 seconds. The more TTimer is fired the more the program is using
CPU-time....
Hans Zandbergen
 

Re:timer application

"Sudesh" < XXXX@XXXXX.COM >wrote in message
Quote
I have to keep TTimer interval 1 second or may be 500
ms and then compare time at each firing and check?
That is one way to do it. Another way is to calculate the difference
between the current time and the target time and then set the timer to
trigger when that difference elapses.
Alternatively, I recall there being a type of event that can be signalled at
a specific time without using a timer, but I forget what it is right now.
Gambit