procedure TConfigForm.mnuHelpFileClick(Sender: TObject);
//帮助菜单项
var
strPgmPath : string;
begin
if (FindWindow(nil,'帮助') = 0 ) then
//防止重复调用
begin
strPgmPath := ExtractFilePath(Application.ExeName);
//获得程序路径
if strPgmPath[Length(strPgmPath)]='/'
then
strPgmPath := strPgmPath + 'help.chm' //帮助文件路径
else
strPgmPath := strPgmPath + '/help.chm';
if FileExists(strPgmPath) then
ShellExecute(Application.Handle,nil,PChar(strPgmPath),nil,nil,SW_NORMAL)
else
Application.MessageBox('帮助文件不存在!','提示',MB_OK or MB_ICONWARNING);
end;
end;