Solved

Help Screens

Posted on 1998-04-07
1
145 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
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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
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.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

743 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

13 Experts available now in Live!

Get 1:1 Help Now