Category : Files from Magazines
Archive   : ITP9002.ZIP
Filename : SCREEN.PAS
{
A demonstration unit utilizing units from the
Technojock Toolkit
Purpose: Initialize a program's main screen,
including Main Menu, DateTime bar,
and Program Title.
Copyright 1990 George L. Butts
Small Systems Development
}
interface
uses
Crt, { Borland Unit }
MiscTTT5, { Date and Time Functions }
FastTTT5, { Screen Write routines }
menuttt5, { Menuing routines }
keyttt5, { Keyboard handler }
winttt5; { Windowing unit }
Var
MainMenu : Menu_Record;
Choice,
Error : Integer;
Procedure InitMenu;
Procedure RunMenu;
Implementation
{$F+}
Procedure ClockBar;
begin
WriteAt(1,25,Black,LightGray,Date);
WriteAt(55,25,Black,LightGray,Time);
end;
{$F-}
Procedure InitMenu;
begin
SaveScreen( 1 );
FillScreen(1,2,80,24,LightGray,Blue,' ');
ClearLine(1,Red,LightGray);
WriteCenter(1,Red,LightGray,
'TechnoJock Demo');
ClearLine(25,Black,LightGray);
Menu_Set( MainMenu );
With MainMenu do
begin
Heading1 := 'Main Menu';
Topic[1] := 'Load';
Topic[2] := 'Save';
Topic[3] := 'Print';
Topic[4] := 'Exit';
TotalPicks := 4;
end;
end;
Procedure LoadSomething;
begin
WriteAt(1,1,Black,LightGray,'Loading');
Sound(220); Delay(400); NoSound;
WriteAt(1,1,Black,LightGray,' ');
end;
Procedure SaveSomething;
begin
WriteAt(1,1,Black,LightGray,'Saving');
Sound(440); Delay(400); NoSound;
WriteAt(1,1,Black,LightGray,' ');
end;
Procedure PrintSomething;
begin
WriteAt(1,1,Black,LightGray,'Printing');
Sound(880); Delay(400); NoSound;
WriteAt(1,1,Black,LightGray,' ');
end;
Procedure RunMenu;
begin
Choice := 1;
Repeat
DisplayMenu(MainMenu,False,Choice,Error);
Case Choice of
1 : LoadSomething;
2 : SaveSomething;
3 : PrintSomething;
end;
Until (Choice = 4) OR (Error = 1);
RestoreScreen( 1 );
end;
Begin
Assign_Idle_Hook( ClockBar );
InitMenu;
End.
Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!
This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.
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/