Category : Pascal Source Code
Archive   : TOPS.ZIP
Filename : GETCOLOR.DEM

 
Output of file : GETCOLOR.DEM contained in archive : TOPS.ZIP
PROGRAM CHANGE_COLOR_DEMO;
USES CRT,DOS,IOSTUFF,GETCOLOR;
VAR
Fore,Back : Integer;
Ch : Char;
{===================================================================}
BEGIN
Fore := LightGray;
Back := Blue;
SetColor(Fore,Back);
ClrScr;
WriteSt('ChooseColor allows the user to choose the foreground and ',5,5);
WriteSt('background colors from a color smorgasbord menu. Note that',5,6);
WriteSt('The currrent colors are indicated on the menu initially.',5,7);
WriteSt('Hit any key to proceed.',5,8);
Ch := ReadKey;

SetChooseColor(20,5); { Set the location of the menu at 20,5 }
Repeat
ChooseColor(Fore,Back); { Note that the colors are LightGray and Blue}
{ going in. But ChooseColor will return the }
{ new colors in Fore and Back. You must call}
{ SetColor to activate the new colors before }
{ you write. }
SetColor(Fore,Back); { Sets TextAttr to chosen colors }
FillScr('*'); { Fill screen to show how colors look }
WriteSt('Do it again?',1,25);Clreol;
Ch := ReadKey;
Until Ch in ['n','N'];

End.



  3 Responses to “Category : Pascal Source Code
Archive   : TOPS.ZIP
Filename : GETCOLOR.DEM

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/