var Path: pChar; begin if FileExists(ExtractFilePath(Application.Exename) + 'Help.pdf') then begin path := pchar(ExtractFilePath(Application.Exename) + 'Help.pdf'); ShellExecute(0, 'open', path, nil, nil, SW_SHOWNORMAL); end else showmessage(Smainform_iOEuIAEAO); end;
function HtmlHelpA(hwndCaller: THandle; pazFile: String;
uCommand, dwData: DWord):DWord; stdcall external 'hhctrl.ocx';
然后调用
HtmlHelpA (handle,'帮助.chm', 0, 0);
好像调用DLL一样
Path: pChar;
begin
if FileExists(ExtractFilePath(Application.Exename) + 'Help.pdf') then
begin
path := pchar(ExtractFilePath(Application.Exename) + 'Help.pdf');
ShellExecute(0, 'open', path, nil, nil, SW_SHOWNORMAL);
end
else
showmessage(Smainform_iOEuIAEAO);
end;