Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

help files 1

Status
Not open for further replies.

brews

Technical User
Dec 12, 2007
194
US
Have two help files; one for OS versions through XP (winhelp) and another for OS 6 and above (html). The installer I use, Inno, will install only the help file for the correct version. Something like minversion 6.0 and onlybelowversion 6.0

What I would like to do is to check either the version of the OS or see if the help file - either help.hlp or help.chm is present.
Something like:
Code:
Private Declare Function HtmlHelp Lib "HHCtrl.ocx" Alias "HtmlHelpA" _
    (ByVal hWndCaller As Long, ByVal pszFile As String, ByVal uCommand As Long, dwData As Any) As Long
Private Declare Function OSWinHelp% Lib "user32" Alias "WinHelpA" (ByVal hwnd&, ByVal HelpFile$, ByVal wCommand%, dwData As Any)

Private Sub mnuHelpContents_Click()
    Dim nRet As Long
       If App.HelpFile("help.hlp") = "" Then
            App.HelpFile = "help.chm"
            nRet = HtmlHelp(Me.hwnd, App.HelpFile, HH_DISPLAY_TOPIC, 0)   'for HTML help
       Else
         'add stuff here for winhelp file 
       End If
End Sub
but App.Helpfile("help.hlp") ="" does not work.

Any ideas would be great. thanks
 
You can always use len(dir("pathtofolder\help.hlp"))>0 to check whether the file is present.
 
i don't think that app.helpfile accepts parameters.
It sets or retrieves the name of the associated helpfile.

app.helpfile = "c:\test.hlp"
msgbox app.helpfile

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top