delphi调用chm帮助文件实例

Uses ShellAPI
ShellExecute(handle, 'open', 'C:/wjiachun.chm',nil, nil, sw_ShowNormal);

implementation

uses ShellAPI;

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
begin
 ShellExecute(0, 'open', PChar(Application.HelpFile), nil, nil, SW_SHOW);
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
 Application.HelpFile := 'g:/NetShow.chm';
end;

或者:
implementation

{$R *.dfm}

function  HtmlHelpA(hwndCaller: THandle; pazFile: String;
 uCommand, dwData: DWord): DWord; stdcall external 'hhctrl.ocx';


procedure TForm1.Button1Click(Sender: TObject);
begin
 HtmlHelpA(Handle,  Application.HelpFile,  0,  0);
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
 Application.HelpFile := 'g:/NetShow.chm';
end;

function HtmlHelp(hwd : integer;pszFile :    String;uCommand :Integer;dwData :LongInt):integer; stdcall;external 'HHCtrl.ocx' name 'HtmlHelpA';

procedure TForm1.Button1Click(Sender: TObject);
begin
 Htmlhelp(self.handle,'help/help.chm',0,0);
end;


联系电话:
020-00000000
联系电话:
020-00000000
联系电话:
020-12345678