Solved

Opening Help Files fraom Delphi

Posted on 1998-06-15
5
216 Views
Last Modified: 2010-04-03
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
Comment
Question by:rainbowsoftware
5 Comments
 
LVL 1

Expert Comment

by:Greedy
ID: 1352891
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
 
LVL 1

Expert Comment

by:Greedy
ID: 1352892
humm...that's the same thing exployer does...but you want it to always open on the Contents tab right?
0
 

Expert Comment

by:paulo_psa
ID: 1352893
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
 
LVL 5

Expert Comment

by:ronit051397
ID: 1352894
0
 

Accepted Solution

by:
fhill earned 50 total points
ID: 1352895
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question