• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 304
  • Last Modified:

Opening Help Files fraom Delphi

I made a Help file for a Delphi program with *.HLP and *.CNT
and it works fine when dobbelclicking the *.HLP file from a HLP icon.
But using this code in a Delphi program
Application.HelpFile := 'EMNEBANK.HLP';
Application.HelpCommand(Help_Contents, 0);
the Contents page where I can open the HLP books is not opened.
What am I supposed to write to oen the Contents page?
0
rainbowsoftware
Asked:
rainbowsoftware
1 Solution
 
GreedyCommented:
Try this
WinHelp(Form1.Handle, pchar(Application.HelpFile), HELP_FINDER, 0);

eeehh...that works sometimes but if the user moves it to another tab it displayes that tab instead...
0
 
GreedyCommented:
humm...that's the same thing exployer does...but you want it to always open on the Contents tab right?
0
 
paulo_psaCommented:
Hi rainbow,

You need first indicate where is your help file.
Go to Project>>Options>>Application and fill the path in "Help File:" field.

After this put this code in your procedure:

Application.HelpCommand(HELP_CONTENTS,0); {for contents}


OR you can use:

const
     EmptyString: pChar='';
begin
     Application.HelpCommand(HELP_PARTIALKEY,Longint(EmptyString));
end;

{ for topics }

0
 
ronit051397Commented:
0
 
fhillCommented:
be sure you have the hlpfile.cnt & hlpfile.hlp files in your exe directory.

Application.HelpFile := extractFilePath(ParamStr(0))+'hlpname.hlp';
Application.HelpCommand(HELP_CONTENTS, 0);

0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now