Note: regardless of my current on the form, it is time to remind, if each form should write the timer events
CodePudding user response:
Put the main form.CodePudding user response:
Main form put a timerProcedure TForm2. Timer1Timer (Sender: TObject);
Var
Dt: TDateTime;
The begin
Dt:=StrToDateTime (' 10:00:00 2015-06-16 ');
If (now () & gt;=(dt) and (now () & lt; Dt + 1/24/60) then//in a minute. Of course you can only use now ()=(dt) to judge, this is your timer interval must be less than or equal to 1000
The begin
Timer1. Enabled:=false;
//execution remind
end;
end;
CodePudding user response:
Generally in the main window, put a Timer control, don't set, the Timer control is independent thread, war with CPU time,All the time, can be in this Timer, judgment,
Code needs to optimize upstairs, because the Timer is 1 seconds interval judgment, a minute, you can have the chance to 60 times,
CodePudding user response:
Actually the basic press lyhoo163 said, full of trouble occupy system performance, but this really don't need to seriously consider demand