I've written a help project, which works fine in all respects, and from VB can get it to display any topic etc. If I open Explorer and double click the .HLP file then it opens up correctly, dislaying the contents tab and giving it focus. However, no matter what I try I cant seem to get VB to default to the contents tab. The code, and variations of it I've tried is as follows :
IRETCDE = WinHelp(Me.hwnd, "C:\MyHelp.hlp", HELP_CONTENTS, CLng(0))
This kinda works, except that it brings up the first topic defined in the help project file and not the Contents tab. From this window I can go to the Contents tab and everything works, but I just cant get it to default to the Contents tab. In the above code then Iretcde returns 1.
I'm sure it must be something really simple, but I just cant figure it out. If I try to open it using a Shell command then it works fine, but I know it must be possible using code similar to the above. The problem using Shell is also working out if it's still open or not.
All help appreciated, but please don't lock the question unless you have the most brilliant answer.
Many thanks in advance,