Launch .chm help with "topic"

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.

I’m assuming windows (cause u mentioned CHM). Can u use SHELL?
http://stackoverflow.com/questions/11076952/open-chm-file-at-specific-page-topic-using-command-line-arguments

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

Why don’t you use the launch parameters ?

http://documentation.xojo.com/index.php/FolderItem.Launch

[code]Dim f as FolderItem =app.ExecutableFile.parent
f = f.child(“myapphelpfilname.chm”)

if f <> Nil And f.exists then
f.Launch("::/" + trim(sTopic) + “.htm”)
End if[/code]

BTW when you post code, please select it and click the code icon above the editor, so it makes it more legible for others, like what I posted above.