Start New Discussion within our Software Development Community

I used 3 timer component and I m using one checkbox. And I have three procedures for timer1, timer2 and timer3 and I writed below these in my unit code explorer. Note that band1,band2 and band3 are images that will be animated ordinarily.
procedure TForm1.Timer1Timer(Sender: TObject);
begin
timer1.Enabled:=true;
timer1.Interval:=2000;
band1.Visible:=true;
end;

procedure TForm1.Timer2Timer(Sender: TObject);
begin

if band1.Visible=true then
begin
timer2.Enabled:=true; //set timer2
timer2.Interval:=4000;//work timer2 40 million miliseconds
band2.Visible:=true; //fire the command
end;
end;

procedure TForm1.Timer3Timer(Sender: TObject);
begin
if band2.Visible=true then
begin
timer3.Enabled:=true;
timer3.Interval:=6000;
band3.Visible:=true;
end;
But I want to use these three events in my checkbox6 component's click event procedure. can you help me about that object. how will I write the code inside my click event procedure for using my timer components according to checking position of my checkbox whose caption is "animate" .
procedure TAnaform.CheckBox6Click(Sender: TObject);
begin
if checkbox6.Checked then
begin
?????????????????????*here how will I write code using sender reserved word
???????????????????????
???????????????????????????
end;
end;

You have still failed to stick your code in [[I][/I]code[I][/I]] blocks, so that it is not a nightmare to read.

May I ask what exactly it is you are doing that requires so many components and timers all on one form? Your program is going to work like an elephant in a chicken coup.

To use a timer, just read your TTimer documentation. It gives very nice examples of how to use it.

This article has been dead for over six months. Start a new discussion instead.