{
The following code changes the Help file depending on the active form, before the help viewer is called. AppHelp is assigned to the OnHelp event handler of Application in the OnCreate event of Form1.
} 
function TForm1.AppHelp(Command: Word; Data: Longint; var CallHelp: Boolean): Boolean;
begin
  Application.HelpFile := Screen.ActiveForm.Name + '.hlp';
  CallHelp := True;
end;
function TForm1.FormCreate(Sender: TObject);
begin
  Application.OnHelp := AppHelp;
end;
