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;
Lastly, I want to use these codes in a indefinite loop to work these images like an animation permanently since my checkbox is not checkbox.
Sorry I m not professional to write the forum. Ok I will be more careful after you told me secondly thus the code scopes will not be a nightmare for you. :)