我在delphi的运行环境中调用shellExecute(Handle, 'open', PChar('help/newproject.chm'),nil, nil, SW_SHOW);
end;没问题。可是程序打包后在运行时就没有反应了,帮助文件不出来。为什么?谢谢

解决方案 »

  1.   

    哈,哈哈,狂晕
    用这个函数再试试 
    Winexec(PChar(GetCurrentDir+'help/newproject.chm'),SW_SHOW);
      

  2.   

    procedure TMain_Form.ExecHelp(aName: string);
    var
      zDir: array[0..79] of Char;
    begin
      if FileExists(ExtractFilePath(Application.ExeName) + 'Help\' + aName) then
        ShellExecute(Application.Handle, 'open', Pchar('Help\' + aName), nil, StrPCopy(zDir, ExtractFilePath(Application.ExeName)), SW_SHOW);
    end;