Category : Pascal Source Code
Archive   : PASS_ALL.ZIP
Filename : TI674.ASC

 
Output of file : TI674.ASC contained in archive : PASS_ALL.ZIP







PRODUCT : Turbo Pascal NUMBER : 674
VERSION : 6.0
OS : MS/PC DOS
DATE : February 28, 1992 PAGE : 1/2

TITLE : Change Foreground and Background Color




{

This program will place a new foreground and background color and
pattern on the desktop. It will also set the character that is
displayed for the pattern.

This example: the $05 defines the 0 for black foreground and
the 5 for purple background.

}

program ColorManipulation;

uses
Dos, Objects, Drivers, Memory, Views,
Menus, Dialogs, App;
type
PMyBack = ^TMyBack;
TMyBack = object(TBackground)
constructor Init(var Bounds: TRect);
end;

PMyApp = ^TMyApp;
TMyApp = object(TApplication)
MyBack: PMyBack;
constructor Init;
function GetPalette:PPalette; virtual;
end;

function TMyApp.GetPalette: PPalette;
const
MyBackColor : TPalette = CColor; { sets palette to CColor }
{ items }
begin
MyBackColor[1]:=#$05; { TBackGround Color Constant's first }
{ number is background and second is }
{ foreground }
GetPalette := @MyBackColor;
end;

constructor TMyBack.Init(var Bounds: TRect);
begin














PRODUCT : Turbo Pascal NUMBER : 674
VERSION : 6.0
OS : MS/PC DOS
DATE : February 28, 1992 PAGE : 2/2

TITLE : Change Foreground and Background Color




TBackground.Init(Bounds, '²');{ places ASCII 178 char as }
{ pattern for text on desktop }
end;

constructor TMyApp.Init;
var
R:TRect;
begin
TApplication.Init;
GetExtent(R);
MyBack:= New(PMyBack, init(R));
Desktop^.Background:= MyBack;
Desktop^.Insert(Desktop^.Background);
end;

var
TheApp: TMyApp;
begin
TheApp.Init;
TheApp.Run;
TheApp.Done;
end.





























  3 Responses to “Category : Pascal Source Code
Archive   : PASS_ALL.ZIP
Filename : TI674.ASC

  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/