home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
World of Shareware - Software Farm 2
/
wosw_2.zip
/
wosw_2
/
PASCAL
/
DHHELPER.ZIP
/
DEMO1.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1990-06-12
|
2KB
|
60 lines
Program Demo1;
{===========================================================================}
{
{ This program shows how to use Help files in Turbo Pascal programs.
{ Run the program with Turbo Pascal 4.0 or higher, making sure the units
{ HELP.TPU, DOSSHELL.TPU and LIBRARY1.TPU are in the current directory, or
{ in the unit path.
{
{ You will be prompted to enter a filename - type in the full filename of
{ a help file created previously with The Helper. (eg. demo1.hlp)
{
{===========================================================================}
{$M $4000,0,$4000} {Set max heap size. This is required only if the *.hlp }
{help files you use make use of the DOS shell facility.}
{The stack and heap values should be at least as shown.}
uses crt, help; {To allow access to screen and Help utilities}
Var
FileName : String; {The file name of the compiled help file to use}
Procedure Get_Help;
{-----------------------------------------------------------------------}
{The recommended way to use Help is through a procedure such as this:
{Use The Helper, after checking that it has been correctly initialised.
{-----------------------------------------------------------------------}
Begin
SaveHelpBG; {Save the background so that it can be restored between }
{displaying successive Help screens, which may overlap or}
{be of different sizes. If you don't have this statement }
{each screen will simply be overlayed over the previous }
{screen, and when you exit from Use_Help() the last Help }
{screen will be left displayed. }
If not HelpInitialised then Initialise_Help(FileName);
If HelpInitialised then Use_Help(HelpCat);
RestoreHelpBG; {Restore the saved screen before returning}
End;
BEGIN
{--------Request a help file name}
Write('The Helper. Enter full filename: ');
Readln(FileName); If FileName='' then Halt;
{-------Clear screen, and use the help file}
ClrScr;
Get_Help;
{-------Write a message if not successful}
If not HelpInitialised then begin
Write('Help file ',Filename,' not initialised. Press Enter..');
Readln;
End;
{-------Clear screen and end}
ClrScr;
END.