OnHelp (Delphi)
Description
This example requires a TApplicationEvents and a TListBox on the form. Select the TApplicationEvents, double-click the OnHelp event and add the following code to the handler. Trigger this event by pressing the F1 key or call the HelpContext method. Set CallHelp to True if the application should still invoke the help system after the event.
Code
function TMainForm.ApplicationEventsHelp(Command: Word; Data: Integer;
var CallHelp: Boolean): Boolean;
begin
lbOther.Items.Add('Event OnHelp');
CallHelp := False;
end;