Recent

Author Topic: Changing text color/size on wince  (Read 1402 times)

helpwithfpc

  • New member
  • *
  • Posts: 5
Changing text color/size on wince
« on: May 31, 2016, 10:44:30 pm »
laptop: windows 7 home premium edition
free pascal: version 3.0.0
lazarus: version 1.6

netbook: LanYu
OS: windows ce 6.0
cpu: wm 8505 300mhz
display: 7" TFT 800*480
memory: DDR II 128mb

Program below opens dos window, writes text, waits for
me to press a key (which is what i want).

I would like however to be able to change the color of the text,
background and size in the dos window that opens. I have looked
everywhere and it seems all the explanations to change color
use the 'crt' unit. This unit is not acceptable when compiling
for the wince netbook (see error below).

In addition, the version of  dos on the netbook does not have
the 'color' command like 'normal' dos so i can't do a command
like i did below to clear the screen. Is there any way with
pascal to change the text/background color and also the size
w/o trying to issue a color command in the dos window that
opens or use the 'crt' unit ?


program testit;

{$appdata console}

uses dos,sysutils;

begin
exec('cmd.exe', '/c cls');
writeln;
textcolor(white);
texbackground(blue);
writeln('this is a test');
readln;
end.

Error: Identifier not found "textcolor"
Also get the same msg for textbackground,white and blue.
If I add the crt unit, the above works.
(this is on the laptop)

however, using lazarus & fpc and compiling for wince,
using the same code as above, i get the same
messages as those above. If  i add in the crt unit, i get:
Fatal: Cannot find crt used by testit of the Project Inspector