Re: Displaying a message at specified time

[ Related Articles and Replies ] [ DelphiLand FAQ ] [ Delphi Tutorials ]

Posted by Marconi on August 28, 2002 at 18:30:41:

In Reply to: Re: Displaying a message at specified time posted by Met@ on August 27, 2002 at 20:24:13:

: : : : : Hey everybody!

: : : : : I've got a question :D I want my program to display a message at a specified time; e.g. every day at 12.00 pm, the program displays a message: "Time to go to bed!" Is this possible? If yes: how?

: : : : You can put a timer object in your application, that's check the time of your computer every minute, and send the message when you want. Is important to set the timer interval to 60000 miliseconds in this case. If these number is to low your aplication will be very slow.

: : : Erm...about the solution you gave me...I thought of that before, but I didn't know the code! Can you help me with the code? Cuz....I don't know how to put a "time check" in my application and I don't know how I can let it trigger my message!

: : Try it

: : procedure TForm1.Timer1Timer(Sender: TObject);
: : begin
: : if time=StrToTime('00:00') then begin
: : ShowMessage('Time to go to Bed');
: : // more code .... if you desire
: : end;
: : end;

: : Marconi

: TNX! Erm......I got it to work, but it won't display a message! DOES it "grab" my pc time? If not: how can I get the program to "grab" my pc time?
: The code is:

: ......
: ......

: Met@

I don't urdestand english very well. I know what is a grab (animal), but what you mean with "grab a computer"?

To set it off You can call the program "C:\WINDOWS\RUNDLL.EXE user.exe,exitwindows"

To freeze it, You can remane the extension of any "txt" file to "exe" and try to execute it.

You can see is this page why to run another exe file.

if the message is not displayed you can try this
if Copy(TimeToStr(time),1,5)='20:28' then begin


Related Articles and Replies: