Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Application.OnHelp doesn't work in Delphi 7

324 views
Skip to first unread message

Thiago Quadros

unread,
Apr 2, 2003, 2:45:27 PM4/2/03
to
Hello all,

I'm trying to use Application.OnHelp event but it's not being called.
Look at the following example:

procedure TForm1.FormCreate(Sender: TObject);
begin
Application.OnHelp:= ApplicationOnHelp;
Application.HelpFile:= 'D:\MyApp\MyHelpFile.hlp';
HelpContext:= 120001;
end;

function TForm1.ApplicationOnHelp(Command: Word; Data: Integer; var
CallHelp: Boolean): Boolean;
begin
ShowMessage('Help');
CallHelp:= False;
Result:= True;
end;

When clicking F1, the event handler is ignored and the help appears.
Did I forget somenthing???

Atention: The same example works fine in Delphi 5.

Att,

Quadros, Thiago

Alexander Halser

unread,
Apr 2, 2003, 4:35:23 PM4/2/03
to
Did you include the option "biHelp" in the BorderIcons property of your
form? F1 should trigger Application.OnHelp if "biHelp" is included.

Another call that doesn't work in D7 is "Application.HelpContext(number)" -
it should fire the OnHelp event as well but doesn't. The workaround here is
to use "Application.HelpCommand(HELP_CONTEXT, number)" instead, which is
actually the same.

--
Alexander Halser


"Thiago Quadros" <thi...@rm.com.br> wrote


> I'm trying to use Application.OnHelp event but it's not being called.

Steve O'Neill

unread,
Apr 25, 2003, 1:17:09 PM4/25/03
to
I have an HTML help handler that hooks into Application.OnHelp, and I can get
help from the main form but not any other forms. The OnHelp event only fires
from the main form. This worked in D6, but not in D7. Adding biHelp is
possible, the that requires the doc folks to take all new screen shots, and
isn't correct anyway; ie, it shouldn't need that, and the "Whats This?" arrow
wouldn't be used as intended (losing XP logo eligibility).

Is anyone else having this problem (aside from the OP)? More to the point, has
anyone found a solution?

Martin Stoeckli

unread,
Apr 28, 2003, 8:01:42 AM4/28/03
to
Hello Steve

In Delphi7 there is a interface to implement. Depending on biHelp, the
OnHelp or the interface is called (i think this could be a bug). Have a look
at:
http://www.martinstoeckli.ch/delphi/delphi.html#VclHtmlHelp

Regards:
Martin


"Steve O'Neill" <ste...@omsoft.com> schrieb im Newsbeitrag
news:3EA96D95...@omsoft.com...

steve

unread,
Apr 28, 2003, 6:02:13 PM4/28/03
to
nice site! Thanks!
0 new messages