/*
OnHelp example
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.
*/ 
bool __fastcall TForm1::AppHelp(Word Command, long Data, bool &CallHelp)
{
  Application->HelpFile = Screen->ActiveForm->Name + ".hlp";
  CallHelp = true;
}

void __fastcall TForm1::FormCreate(TObject *Sender)
{
  Application->OnHelp = AppHelp;
} 
