![]() |
| ||
| three timer component problem inside my checkbox event procedure 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; |
| ||
| Re: three timer component problem inside my checkbox event procedure You have still failed to stick your code in [code] 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. |
| All times are GMT -4. The time now is 5:51 pm. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC