home *** CD-ROM | disk | FTP | other *** search
- {$R+,S+,I+,D+,T-,F-,V-,B-,N-,L+ }
- {$M 16384,16384,16384 }
- PROGRAM KTOOLSDEMO;
-
- USES
- DOS,
- CRT,
- KTOOLS;
-
- VAR
- Str80 : String[80];
- Ch : Char;
- Lines : array[1..6] OF Byte;
- L,Z : Integer;
- Fore,Back : Integer;
-
- { Variable sizes can be any size you choose only if we use $V- before our
- calls to KTOOLS.TPU }
-
-
- BEGIN
-
- ClrScr;
-
- CursorOff;
-
- KWrite(2,1,15,'This line is passed as actual param. to KWrite');
-
- Str80:='Hello world, I''m Drue Kennon! was passed as a variable.';
-
- KWriteV(5,1,12,Str80);
-
- KWrite(8,1,15,'Next line is actual & centered');
-
- KWriteC(9,11,'Hello world, I''m Drue Kennon!');
-
- Str80:='Hello World, I''m a centered variable.';
-
- KWrite(11,1,15,'Next line is varriable & centered');
-
- KWriteCV(12,6,Str80);
-
- Str80:=' I had 10 leading blanks and 10 trailing ones ';
-
- KWriteV(14,1,4,Str80);
-
- KTrim(Str80);
-
- KWrite(16,1,15,KUCase('Now I have none on either side of me!'));
-
- Kwrite(18,1,3,Str80);
-
- KWrite(20,1,15,'Now to change the attributes of these lines!');
-
- KWrite(22,1,15,'Press any key to fill the screen via (KFill)');
-
- Delay(5000); {Pause for 15 secs or so.}
-
- Lines[1]:=2;
- Lines[2]:=5;
- Lines[3]:=9;
- Lines[4]:=12;
- Lines[5]:=14;
- Lines[6]:=16;
-
- REPEAT
- FOR Z := 0 TO 15 DO
- BEGIN
- FOR L := 1 To 6 DO
- KAttr(Lines[l],1,1,80,Z);
- END;
- UNTIL KeyPressed;
-
- Ch := ReadKey; {swallow keypressed character}
-
- KFill(5,10,15,60,'*',121);
-
- CursorOn;
-
- KWrite(22,1,color(15,0),' ');
- KWrite(23,1,15,'Enter a foreground color i.e. 10, 13 etc...: ');
- Read(Fore);
-
- KWrite(23,1,color(15,0),' ');
- Str80 := '';
- Str80 := 'Enter a background color i.e. 0, 5 etc...: ';
- KTrim(Str80);
- KWriteV(23,1,15,Str80);
- Read(Back);
-
- KFill(5,10,15,60,'*',Color(Fore,Back));
-
- End.