Create animations with Delphi 7

okay, now we will discuss about creating animations with delphi7 .. actually this animation,,, just a simple animation, but this is the basic stage to make the next animation,,,, and now, we will try to make animations with delphi7,,,

steps :
1. select menu>>>file>>>new>>>form.



2. select label (like letter A ).

3.  then, put on the form that we created earlier.


4. then, select the timer, system>>>timer.

Then, place it on form before.

5. select standar>>>button (that read "OK").

6. Put in the form, and the caption change to "start"


7. then type the program as below. 

------------------------------------------------------------------------------------------------
      {$R *.dfm}
      procedure delay(lama:word);
      var 
      temp:dword; 
      begin 
      temp:=gettickcount; 
      repeat 
      application.processmessage; 
      until(gettickcount-temp)>=lama; 
      end;

------------------------------------------------------------------------------------------------
 
its type must be located under "{$R *.dfm}"


8. Then, double click on the timer ( wich is shaped clock located in the aearlier form).
     type the program under
 
------------------------------------------------------------------------------------------------
     procedure Tform.timer1timer(sender:Tobject)
     begin
     label1.caption:='M';delay(50);
     label2.caption:='E';delay(50);
     label3.caption:='R';delay(50);
     label4.caption:='A';delay(50);
     label5.caption:='H';delay(50);
     label1.caption:='';delay(50);
     label2.caption:='';delay(50);
     label3.caption:='';delay(50);
     label4.caption:='';delay(50);
     label5.caption:='';delay(50);
     end;
     end.
 ------------------------------------------------------------------------------------------------


9. Change enabled>>>false. 

10. And run application by clicking on the menu run>>>run

 if are errors, usually located on the program type, you can also change the color and other forms
according to your taste...

good luck.............

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel