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
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.
Is anyone else having this problem (aside from the OP)? More to the point, has
anyone found a solution?
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...