如果在delphi挂帮助?
解决方案 »
- 数组错误怪问题out of memory
- SQL SERVER 2005中表如何在已经有大量数据的情况下进行修改字段
- 从100*94这种数据中提取
- 急问!!delphi7.0如何读取并显示access2000中用ole存的gif文件啊?
- 大家评评这个江湖怎么样?
- 这里有对dbexpress熟悉的人吗?
- 如何以不同控件打开不同扩展名文件,比如pdf和doc用OpenDialog打开,用case语句控制可以吗
- 讨论Delphi中得Com组件
- 我如何能在运行程序的时候让我的电脑屏幕呈现windows关机时候的“虚屏”现象?
- 怎样得到 CPU 的 ID ?
- 急!SPCOM问题,$11无法接收
- help me! 我需要运行一个delphi的系统,但缺文件!
是CHM文件,可以用ShellExecute调用hh.exe。
Application.HelpJump('TApplication_HelpJump');
用API函数比较好
procedure Tfrm_main.mnu_SysHelpClick(Sender: TObject);
var
tmpFile:string;
begin
inherited;
tmpFile:= PApp_path+'help.chm'; //PApp_path为路径
if FileExists(tmpFile) then begin
ShellExecute(handle,nil,pchar(tmpFile),nil,nil,sw_ShowNormal);
end;
end;
WinExec(Pchar('HH ' +ExtractFilePath(paramstr(0))+'Help.chm'),SW_SHOWNORMAL);
var
PathHelpFile:string;
begin
PathHelpFile := 'hh.exe D:\COSTING\costing.chm';
if Winexec(Pchar(PathHelpFile), sw_normal) < 31 then
DJShow(CON_NO_FIND_APP); //自定義未找到顯示對話框
end;procedure TMainForm.btnHelpClick(Sender: TObject);
begin
AboutSystem; //調用
end;在工程單元
Application.Initialize;
加入代碼:
Application.HelpFile := 'D:\COSTING\costing.chm';
//指定幫助文件位置
你作成 .chm文件,假设是 help.chm
再:
winexec ('hh','help.chm');注意路径!最好把 chm文件放到当前工程文件下!
接分了!
var Handled: Boolean);
begin
if Msg.message=WM_KeyDown then
if msg.wParam=vk_f1 then
begin
ShellExecute(application.handle,'open','c:\myhelp\help.chm','','',sw_show);//创建帮助窗口
handled:=True;
end;
end;
这么调用按f1键都行了。给点分吧,最近没上,长的好慢。