I know I can launch the .chm file like this:
Dim f as FolderItem =app.ExecutableFile.parent
f = f.child(“myapphelpfilname.chm”)
if f <> Nil And f.exists then
f.Launch
End if
But how do I pass the “topic” string to the .chm.
I have some old VB code to do that but it was complicated and I don’t think it really translates over to Xojo.
Right on I got that to work by using the following in case anyone wants to do this in the future… where sTopic is a string passed into a launchHelp method.
// try the shell version to pass the topic over
Dim FolderName,FileShellPath As String
Dim f as FolderItem =app.ExecutableFile.parent
Dim sh as new shell
sh.timeout=20000
f = f.child("NameOfYourHelpFile.chm")
FileShellPath=f.ShellPath
Dim results, execStr as string
execStr = "start /B hh.exe mk:@MSITStore:"+FileShellPath + "::/" + trim(sTopic) + ".htm"
//MsgBox("shell exec:<" + execStr + ">")
sh.Execute (execStr)
results=sh.Result