Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I want to include a help file with a program I am writing. I have written and compiled a .chm file.

 

I want the user to be able to either click on a help file menu item or hit F1 to bring up the help file. I have created a helpprovider class in the VB .net designer window and correctly associated my .chm file with it.

 

In the load routine of my form put this line:

HelpProvider1.SetShowHelp(Me, True)

In the clidk event handling function for the help file menu item I put this line:

Help.ShowHelp(Me, "jidat_help.chm", HelpNavigator.TableOfContents)

Hitting F1 brings up the help file. Clicking the help file menu item will not bring up the help file until after I have hit F1.

 

How can I get the help file to show without hitting F1 first? How can I get the help file to show if they only click on the file menu item?

  • 5 months later...
Posted

mskeel,

 

I realize this info. is coming too late to help you but, perhaps, this might help someone else who is have a similar problem.

 

I don't know the actual 'correct' way to do this but the solution I came up with when faced with the same problem was a trick I learned when using Excel VBA.

 

Simulate the 'F1' key being pressed by using:

SendKeys.Send("{F1}")

 

I put that code in my 'mnuHelp_Click' event handler and it solved my problem.

 

Good Luck

  • *Experts*
Posted

With VB's Help class, you can also specify which specific help topic to open:

Help.ShowHelp(Me, Application.StartupPath & "\HelpFile.chm", HelpNavigator.Topic, "SpecificTopic.htm")

Member, in good standing, of the elite fraternity of mentally challenged programmers.

 

Dolphins Software

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...