Solved

Help Screens

Posted on 1998-04-07
1
152 Views
Last Modified: 2010-04-06
Hi there,
    Is there an easy way to create and implement help screens for a Delphi 1 application? I've never done it before so any help would be much apprecited.

Thanks, Linda
0
Comment
Question by:LindaMacy
[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
1 Comment
 
LVL 1

Accepted Solution

by:
Edo082297 earned 20 total points
ID: 1361325
Hi Linda,

The TApplication variable, which every Delphi application has,  contains a property called HelpFile. This is a string that contains the path to a help file associated with the application. Each form, which is derived from TWinControl, has another property called HelpContext. HelpContext provides a context number for use in calling context-sensitive online Help. This means that for individual screens you can have custom help display. You could also call the context menu help by trapping the F1 key OnKeyPress for the form (the form must have focus). To trap a key, do this:

procedure TForm1.FormKeyPress(Sender: TObject; var Key: Char);
begin
  if Key in [VK_F1] then
    MessageDlg('F1 has been pressed', mtInformation, [mbOK], 0);
end;

If you wanted to implement searching on the help file, try this:

The parameter for this command should be a PChar (cast to a
longint to circumvent typechecking) that contains the string on
which you'd like to search.  The example below uses an empty string, which invokes the "Search" dialog and leaves the edit control in the dialog empty, just like when you hit "Find" in Delphi help.

procedure TForm1.SearchHelp;var  P: PChar;
begin
  Application.HelpFile := 'c:\delphi\bin\delphi.hlp';  
  P := StrNew('');
  Application.HelpCommand(Help_PartialKey, longint(P));
  StrDispose(P);
end;

Now that you have some utility, you must create the help file! Just go to virtually any good shareware site, and download a recommended help authoring package. They are intuitive and easy to use!

HTH!



0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
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 video Micro Tutorial shows how to password-protect PDF files with free software. Many software products can do this, such as Adobe Acrobat (but not Adobe Reader), Nuance PaperPort, and Nuance Power PDF, but they are not free products. This vide…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

734 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