anchor.diff:    s: TfpgString;
   begin
   //
  +end;
  +
  +procedure TMainForm.MainFormCloseQuery(Sender: TObject; var CanClose: boolean);
  +begin
  +  CloseFile;
   end;
   
   procedure TMainForm.FileOpen;
  
positive.code:     miHelp: TfpgPopupMenu;
      btnIndex: TfpgButton;
      {@VFD_HEAD_END: MainForm}
      FHelpFile: TfpgString;
      Files: TList; // current open help files.
      procedure   MainFormShow(Sender: TObject);
      procedure   miFileQuitClicked(Sender: TObject);
      procedure   miFileOpenClicked(Sender: TObject);
      procedure   miHelpProdInfoClicked(Sender: TObject);
      procedure   miHelpAboutFPGui(Sender: TObject);
      procedure   miDebugHeader(Sender: TObject);
      procedure   SetHelpFile(const AValue: TfpgString);
      procedure   btnShowIndex(Sender: TObject);
      procedure   FileOpen;
      function    OpenFile(const AFileNames: string): boolean;
      procedure   OnHelpFileLoadProgress(n, outof: integer; AMessage: string);
      procedure   LoadNotes(AHelpFile: THelpFile);
      procedure   LoadContents;
      // Used in loading contents
      procedure AddChildNodes(AHelpFile: THelpFile; AParentNode: TfpgTreeNode; ALevel: longint; var ATopicIndex: longint );
  
    public
      constructor Create(AOwner: TComponent); override;
      destructor  Destroy; override;
      procedure   AfterCreate; override;
  //    property    HelpFile: TfpgString read FHelpFile write SetHelpFile;
    end;
  
  {@VFD_NEWFORM_DECL}
  
negative.code:   ProfileEvent( '  Full path: ' + FullFilePath );
    ProfileEvent( '  Loading: ' + lFilename );
  
    CloseFile;
  
    HelpFile := THelpFile.Create(lFileName, @OnHelpFileLoadProgress);
    Files.Add(HelpFile);
  
    WindowTitle := cTitle + ' - ' + THelpFile( Files[ 0 ] ).Title;
  //  WindowTitle := cTitle + ' - ' + HelpFile.Title;
    fpgApplication.ProcessMessages;
  
    { TODO -oGraeme : Load previous notes here }
    for FileIndex:= 0 to Files.Count - 1 do
    begin
      HelpFile := THelpFile(Files[ FileIndex ]);
  