我写了一个应用程序,现在制作了一个以.chm格式的帮助文件,想在单击‘帮助’
按钮后调用该文件,如何实现???

解决方案 »

  1.   

    Application.HelpFile := ExtractFileDir(paramstr(0))+'\商标管理帮助.hlp';
        Application.HelpCommand(Help_Contents,0); { 显 示 帮 助 目 录}
      

  2.   

    首先,在implementation里,作如下声明:  function  HtmlHelpA(hwndCaller: THandle; pazFile: String;   uCommand, dwData: DWord): DWord; stdcall external 'hhctrl.ocx';然后就可以进行使用,例如:      HtmlHelpA (handle,  'c\winnt\help\access.chm',  0,  0);
      

  3.   

    看错了  直接用shellexecute
      

  4.   

    ShellExecute(handle,'Open','help.chm',nil,Pchar(ExtractFilePath(Application.ExeName)),1);
      

  5.   

    出错提示:[Error] UnitMain.pas(180): Undeclared identifier: 'ShellExecute'
      

  6.   

    uses中包含ShellAPI
    begin
    Application.HelpFile := ExtractFilePath('Application.ExeName');
    ShellExecute(0, 'open', PChar(Application.HelpFile+'Help.chm'), nil, nil, SW_SHOW);
    end;
      

  7.   

    uses shellapi
    begin
      ...
      ShellExecute(handle,'Open','help.chm',nil,Pchar(ExtractFilePath(paramstr(0))),sw_show);