Hi, i was wondering if anyone can tell me how to change a font color in pascal, i have created a calculator program to calculate how long my bit torrent downloads have left (going at a certain speed) since i have found the eta field to usually be way off, it all works and all but i cant figure out how to change the colors of the fonts to pretty it up.
This is my code
program calculator;
var per, perl, avs, sizemb, sizekb, etasec, etamin, etahour, etaday, mbleft, kbleft : real;
begin;
writeln('This Program will calculate the approximate time for a download');
writeln('Enter the percentage that has been downloaded : ');
read(per);
perl := 100 - per;
while per < 0 and per > 100 do
begin
writeln('This is not a valid percentage');
writeln('Enter the percentage that has been downloaded : ');
read(per)
perl := 100 - per;
end;
writeln('Now enter the total size (in MB) of the file : ');
readln(sizemb);
sizekb := sizemb * 1000;
mbleft := sizemb / 100 * perl;
kbleft := mbleft * 1000;
writeln('Enter the average speed (in KB/s) to calculate for : ');
read(avs);
etasec := kbleft / avs;
etamin := etasec / 60;
etahour := etamin / 60;
etaday := etahour / 24;
if etasec < 60
then writeln('There is only ', etasec:3:1, 'seconds left of this download')
else writeln('There is ', etamin:3:1, ' Minutes left for this download');
if etamin > 60
then writeln('Which is ', etahour:3:1, ' hours left for this download')
else write;
if etahour > 24
then writeln('(', etaday:3:1, ' Day(s) left for the download)')
else write;
readln;
readln;
end.
I want to change the color of
writeln('There is only ', etasec:3:1, 'seconds left of this download')
writeln('There is ', etamin:3:1, ' Minutes left for this download');
then writeln('Which is ', etahour:3:1, ' hours left for this download')
and
writeln('(', etaday:3:1, ' Day(s) left for the download)')
Can Anyone help me?
HeZzA