怎样在Delphi程序中调用*.chm帮助文档,急急急!!!!!!!!

cmsystem 2003-05-17 09:06:02
在delphi中调用*.chm帮助文档,它说*.chm不是帮助文档文件或或文件被破坏的错误.
怎么办????
...全文
24 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
ljccyzy 2003-05-17
  • 打赏
  • 举报
回复
来晚了,
再说说吧,
先引用shellapi单元,
procedure TForm1.Button1Click(Sender: TObject);
var
s:string;
begin
s:='路径\*.chm';
ShellExecute(Handle,'open',pchar(s),'','',SW_MAXIMIZE);
end;
u2m 2003-05-17
  • 打赏
  • 举报
回复
//说明hhctrl.ocx系统自带的
unit Unit1;

interface

uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls,shellapi;

type
TForm1 = class(TForm)
Button1: TButton;
Button2: TButton;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form1: TForm1;

implementation
function HtmlHelpA(Handle:HWND;lpHelpFile:string;wCommand:integer;dwData:string):Integer;stdcall;External 'hhctrl.ocx';
{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
begin
ShellExecute(handle, 'open', 'KIme.chm',nil,nil, SW_SHOWMAXIMIZED);
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
HtmlhelpA(form1.handle,'KIme.chm',0,'');
end;

end.

5,388

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 开发及应用
社区管理员
  • VCL组件开发及应用社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧