random colour - Programmers Heaven

Howdy, Stranger!

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

Categories

random colour

juice88juice88 Posts: 23Member
How to change the textcolour repeatly??

Comments

  • zibadianzibadian Posts: 6,349Member
    : 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.