random colour

How to change the textcolour repeatly??

Comments

  • : How to change the textcolour repeatly??
    :
    Here is a small example code, which changes both the text and background color of the word 'Hello' every second, until the user presses a key.
    [code]
    repeat
    TextColor(Random(16)+1);
    TextBackground(Random(16)+1);
    GotoXY(1, 1);
    writeln('Hello');
    Delay(1000);
    until Keypressed;
    Readkey;
    [/code]
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion