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;
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;
begin
Application.HelpFile := ExtractFilePath('Application.ExeName');
ShellExecute(0, 'open', PChar(Application.HelpFile+'Help.chm'), nil, nil, SW_SHOW);
end;