colours - Programmers Heaven

Howdy, Stranger!

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

Categories

colours

sexyderrysexyderry Posts: 31Member
if, how do i change the colour of the writing or background or anything? i need a change of colour.

Comments

  • zibadianzibadian Posts: 6,349Member
    : if, how do i change the colour of the writing or background or anything? i need a change of colour.
    :
    In the text mode you need to use TextColor() and TextBackground(), while in the graphical mode you need to use SetColor() and SetBkColor(). See the help files for more information.
  • sexyderrysexyderry Posts: 31Member
    : : if, how do i change the colour of the writing or background or anything? i need a change of colour.
    : :
    : In the text mode you need to use TextColor() and TextBackground(), while in the graphical mode you need to use SetColor() and SetBkColor(). See the help files for more information.
    : do i just write textcolor(blue) 4 example? thanx alot anyway.

  • sexyderrysexyderry Posts: 31Member
    : : : if, how do i change the colour of the writing or background or anything? i need a change of colour.
    : : :
    : : In the text mode you need to use TextColor() and TextBackground(), while in the graphical mode you need to use SetColor() and SetBkColor(). See the help files for more information.
    : THANX ALOT!

  • viv.viv. Posts: 72Member
    well, u see,
    you can put things like blue etc in the brackets, however, using numbers is much more efficient and lets u do more things.for eg., check the program below,
    [code]
    PROGRAM colors;
    VAR col,bkg,snd:integer;
    BEGIN
    REPEAT
    BEGIN
    writeln('enter 0 for all values to exit');
    writeln('what text color do you wish to see?);
    readln(col);
    textcolor(col);
    writeln('what back ground color do you wish to see?');
    readln(bkg);
    textbackground(bkg);
    writeln('what sound do you wish tpo hear?');
    sound(snd);
    END;
    UNTIL (snd=0) AND (col=0) AND (bkg=0);
    END.
    [code]

    this program would be very complex if u uses words like blue etc.
    try it.
    does this help?






Sign In or Register to comment.