[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

How to show a help file

Posted on 1999-01-16
9
Medium Priority
?
155 Views
Last Modified: 2010-04-06
Hi again.... I have a help file called MONITOR.HLP. I wrote this name in the form property HelpFile. The question is, how can I show it?

Thanks in advance
Skel
0
Comment
Question by:skel
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
9 Comments
 
LVL 10

Accepted Solution

by:
viktornet earned 100 total points
ID: 1362224
The usual way is this...

Go to the Form's properties and do this...

Set HelpFile to the name of the help file...

Form.HelpFile := 'MONITOR.HLP';

then you should set the HelpContext to 1 or another number that is different than 0...

If all this doesn't work just do this...

ShellExecute(0, 'open', 'MONITOR.HLP', nil, nil, SH_SHOWNORMAL);

That's all :)

-Viktor
--Ivanov
0
 
LVL 17

Expert Comment

by:inthe
ID: 1362225
hi skel,
well you can either call it off a menu item like so:
 
ShellExecute(Handle, Open,'pathtoyour\monitor.hlp' , NIL, NIL, sw_ShowNormal);

or you can use the context sensitive help, below is taken from delphi help using context help number in delphi's object inspector:

HelpContext displays the help file for an application.
type THelpContext = -MaxLongInt..MaxLongInt;
function HelpContext(Context: THelpContext): Boolean;

Description

Use HelpContext to bring up the help file for the application specified in the HelpFile property. HelpContext calls OnHelp directly.
HelpContext passes the file name contained in HelpFile and the context number passed in Context parameter. For example, if the Context value is 714, the HelpContext method displays the screen with the context help ID of 714 in the Help file.
HelpContext returns False if HelpFile is an empty string, meaning the application has no Help file assigned. In all other cases, HelpContext returns True.

This example uses a bitmap button on a form. When the user clicks the button, the screen with the context number of 714 in the DATA.HLP Help file appears.  Note that using constants for HelpContext numbers makes the code easier to read:

const

  DATANOTFOUND = 714;

procedure TForm1.BitBtn1Click(Sender: TObject);

begin
  Application.HelpFile := 'DATA.HLP';
  Application.HelpContext(DATANOTFOUND);
end;

also for more info look microsoft help workshop in delphi's help/tools directory to assigning topic-id's and designing conext help files.
hope this is of some help <--- :-)
Regards Barry
0
 
LVL 17

Expert Comment

by:inthe
ID: 1362226
hi viktor
 i new i should have refreshed before posting

¤   ¤
  ^
\___/
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 10

Expert Comment

by:viktornet
ID: 1362227
Eh, eh, eh.. :)) I was faster than you Barry :)

  ^----^
/  ¤   ¤ \
\     ^    /
  \_V_/
0
 
LVL 17

Expert Comment

by:inthe
ID: 1362228
right ive had enough im off to buy mavis beacon
lol
0
 

Author Comment

by:skel
ID: 1362229
Viktor... I tried both ways... the first shows me the error that Topic not found, but I can open the help file by executing winhelp.exe program

The second way didn't compile.... it says that ShellExecute is an undeclared identify (the same with SW_SHOWNORMAL).

Thanks
0
 
LVL 10

Expert Comment

by:viktornet
ID: 1362230
if you use ShellExecute() you should include ShellAPI to your uses clause...

Why don't you try Application.HelpFile := filepath;
Application.HelpContext := whatever;//Different than zero,,,

The best way is to use ShellExecute()...so...good luck,,,

-Viktor
--Ivanov
0
 
LVL 1

Expert Comment

by:BlackDeath
ID: 1362231
hi, skel.
hi vik, hi inthe.

skel, try:

Application.HelpFile := ExtractFilePath(Application.ExeName) + 'monitor.hlp';
Application.HelpJump('MonitorContents'); //with MonitorContents being the context string for your context page

Black Death.

0
 

Expert Comment

by:mrpipe
ID: 1362232
Use...

Application.HelpFile := HELPFILE;
Application.HelpCommand(HELP_FINDER, 0);

it's easier...
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Suggested Courses

656 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