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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Displaying help topic via a simple button and toolstripbutton

Status
Not open for further replies.

assimang

Programmer
Mar 11, 2008
96
Hello everybody.

I created a chm file, and I am searching how to display it from my vb project. Well in some forms the help button is a simple button but in some others it's a toolstrip button in a toolstrip menu. I have tried several things in a simple button HelpBtn in the LoginFrm for example, such as creating a Help Provider. I have set HelpBtn's HelpNavigator on TypingHelp property to Topic.
I have tried this:
Private Sub HelpBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles HelpBtn.Click
Help.ShowHelp(Me.HelpBtn, Application.StartupPath & "\TypingHelp\TypingHelp.chm", HelpNavigator.Topic, Application.StartupPath & "\TypingHelp\LoginHlp.htm")
end sub

But when I run the application and click on HelpBtn nothing happens :( If I press F1 button before I click on HelpBtn nothing happens too. But if I first click on HelpBtn (which does nothing) and second press F1 button I can see the chm file. I can't understand what's happening and what can I do for this. Any suggestions?
I also need help on how to display a topic file either through a simple button either through a toolstrip button. I realized that if a create a help provider too, for toolstrip button, I can't access
Any help will be much appreciated.

Thank you
very much
in advanced.
 
Solved.

System.Windows.Forms.Help.ShowHelp(Me.HelpBtn, LoginHlpPrvdr.HelpNamespace, HelpNavigator.Topic, "LoginHlp.htm")

and for toolstripbutton you have to assing the Help Provider with to toolstrip and call the htm like I mention before.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top