Wednesday, June 23, 2010

Delphi: How to make blinking text


To make the text blink in Delphi is very easy. following steps:
1. Open up your Delphi applications.
2. Make a label. How, to select standard tab and then click the image icon "A", then click anywhere on the form



3. Create a timer. How, to select the system tab and then click the icon depicts a clock, and then click anywhere on the form.



 4. Result is more or less the following image:




then double click the icon timer is in the form. then type the following code:

if label1.Visible=True then 
   Label1.Visible:=False
else 
   Label1.Visible:=True;

then we check the code by pressing Ctrl + F9, if there are no errors then we run directly by pressing the F9 key on the keyboard.
See, writing Label1 flashes. to set its slow blinking rapidly, we can change the timer interval from him. how to select the timer icon is in the form, then look at the top left, the object inspector. we can change the value of the interval to determine quickly than had been writing to flash.

Hopefully useful. ^ _ ^

4 comments:

  1. This was very helpful thank you. From Cindy-Lee in South Africa.

    ReplyDelete
  2. Label1.visible := not Label1.visible

    :)

    ReplyDelete
  3. thank you I wanted to do this with images but could not find the code easily - hard to find things out when you are a beginner. I can now have "lights" on the christmas tree go off and on by making the shape visible no visible. I tried to do it as a loop
    for n=1 to 100 do
    Shape1.hide;
    Shape2.show but the loop didnt work. this was much easier. THANKS

    ReplyDelete