Solved

Help Screens

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
how do i create updater to My Activex application? 3 79
add combobox item based on numbers 9 122
find a node in VST 2 63
Convert MS Word document to a PDF file 9 62
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…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

912 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

18 Experts available now in Live!

Get 1:1 Help Now