title: Unable to display .chm help file in Delphi XE2 app - why?
body: <p>We are porting our app to Delphi XE2 from Delphi 6. Problem is, the help file will not display no matter what I try.</p>
  
  <p>Using Delphi XE2 (Update 3) on Win 7 64.</p>
  
  <p>Using a valid help file (.chm) that works with my Delphi 6-built app.</p>
  
  <p>I create a simple app with one button that calls help thusly:</p>
  
  <pre><code>  Application.HelpFile := 'Help.chm';
    if Application.HelpFile &lt;&gt; '' then begin
      Application.HelpContext(0);
    end;
  </code></pre>
  
  <p>I have HTMLHelpViewer in my uses clause.</p>
  
  <p>The help file is in the same directory as the app. When I click on the button the help file is not displayed! I see nothing. No errors.</p>
  
  <p>I tried several different help files, all of which are valid and I can open via Explorer.</p>
  
  <p>I also tried calling the table of contents directly like this:</p>
  
  <pre><code>HtmlHelp(0, Application.HelpFile, HH_DISPLAY_TOC, 0);
  </code></pre>
  
  <p>Nothing is displayed this way either.</p>
  
  <p>What the heck am I missing here? This is a show stopper if I can't make the help file display when users hit the F1 key.</p>
  
  <p>------ EDIT - PROBLEM SOLVED! ------</p>
  
  <p>Sigh, I'm an idiot, but only partially. :)</p>
  
  <p>The simple app indeed had the help file in the wrong directory. The new Delphi XE2 has the default output in a sub-directory, not the original directory like Delphi 6 used to do. I've been bitten by that twice now. :)</p>
  
  <p>So, once I figured that issue out I had to go back to the original app and figure that one out.</p>
  
  <p>It turns out we had our own HTMLHelpViewer.pas unit in the project (BIG project) and that conflicted with the built-in HTMLHelpViewer unit that comes with Delphi XE2.</p>
  
  <p>Once I whacked our version of that file and removed it from the hard drive and added in Delphi's version everything works swimmingly.</p>
  
  <p>Thanks for the knock on the head to help me figure this out.</p>