Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Help Screens

Posted on 1998-04-07
1
Medium Priority
?
154 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 80 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

Industry Leaders: 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!

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…
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…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

705 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