程序做完了,帮助(.chm格式)也作好了,怎样在程序中调用呢?谢

解决方案 »

  1.   

    uses ShellAPI;ShellExecute('open', 'your.chm', nil, nil, SW_SHOW);
      

  2.   

    错了一点,好了一个参数,应该是:
    ShellExecute(0, 'open', 'your.chm', nil, nil, SW_SHOW);
      

  3.   

    方法一:
    uses中包含ShellAPI
    begin
    Application.HelpFile := ExtractFilePath('Application.ExeName');
    ShellExecute(0, 'open', PChar(Application.HelpFile+'Help.chm'), nil, nil, SW_SHOW);
    end;
    方法二:
    procedure TForm1.Button1Click(Sender: TObject);
    var
    p:pchar;
    begin
      if FileExists(ExtractFilePath(Application.Exename)+'YLJXC.chm') then
       begin
        p:=pchar(ExtractFilePath(Application.Exename)+'YLJXC.chm');
        ShellExecute(0, nil, p, nil, nil, SW_NORMAL);
       end
      else
       begin
        p:=pchar(ExtractFilePath(Application.Exename)+'Index.HTM');
        ShellExecute(0, nil, p, nil, nil, SW_NORMAL);
       end;
    end;
      

  4.   


    filepath:='c:\yourhelp.chm';
    ShellExecute(0, 'open', filepath, nil, nil, SW_SHOW);
      

  5.   

    shellexecute(handle,open,pchar(hel.chm),'','',sw_shownormal);
      

  6.   

    shellexecute(handle,open,pchar(hel.chm),nil,nil,sw_shownormal);
    uses中添加ShellAPI