Solved

Opening Help Files fraom Delphi

Posted on 1998-06-15
5
196 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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

708 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now