Witam!
W dziale ARTYKUŁY znalazłem artykuł jak w Delphi pokolorować tekst i tło w konsoli, lecz podczas kompilacji wyskakują mi błędy. Pisałem w komentarzach aby autor podał co ma w uses bo sa bledy ale nie odpisał :/ Może ktoś wie co trzeba zrobić aby kod się skompilował? Oto kod wyciągnięty z artykułu:
var
TextAttr: Byte;
LastMode: Word;
{----- Procedura zmieniająca kolor tekstu --------------------------}
procedure TextColor(Color: Byte);
begin
LastMode := TextAttr;
TextAttr := (TextAttr and $F0) or (Color and $0F);
SetConsoleTextAttribute(StdOut, TextAttr);
end;
{----- Procedura zmieniająca kolor tła -------------------------------}
procedure TextBackground(Color: Byte);
begin
LastMode := TextAttr;
TextAttr := (TextAttr and $0F) or ((Color shl 4) and $F0);
SetConsoleTextAttribute(StdOut, TextAttr);
end;