472,141 Members | 1,002 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,141 software developers and data experts.

Trigger a Help event.

I've managed to get a nice little chm help system written. Now I need
to display it!
I added a HelpProvider to my MDIParent form and set the namespace of
the HelpProvider to be the help file. So far so good - when I press F1,
I get HTML Help popping up with my Help file.
This is good but I've been requested to make Help pop up when the user
clicks on "Help" in the menu, or on a specific Help Button. I'm trying
to trigger the HelpRequested event for the parent form, but I'm not
sure how to do this.
Another question: How does the help file get distributed when I publish
the application and install it on site? I'm guessing I'll have to add
it as a project Resource, but I'm not sure if that will work... will
it? Right now it just seems to work nicely, but I haven't tried
installing on another machine yet.
Finally (this one's probably the most minor): when the help file loads,
it always says "Could not find file" (or something like that), and the
root-level category is selected. The user has to actually click the
root-level category to see its text. I'm pretty sure this is just a
configuration problem, but I can't seem to find anything to solve it.

TIA.

Dec 7 '06 #1
3 1884
Assuming the following is in your help drop down menu
Contents
Index
Search

use the following for contents

Private Sub ContentsToolStripMenuItem_Click(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
ContentsToolStripMenuItem.Click
' Contents dropdown menu
Help.ShowHelp(Me, HelpProvider1.HelpNamespace)

End Sub

--- for index
Private Sub IndexToolStripMenuItem_Click(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
IndexToolStripMenuItem.Click
Help.ShowHelpIndex(Me, HelpProvider1.HelpNamespace)
End Sub
-- for search
Private Sub SearchToolStripMenuItem_Click(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
SearchToolStripMenuItem.Click
Help.ShowHelp(Me, HelpProvider1.HelpNamespace,
HelpNavigator.Find, "")
End Sub
--Distribution of help file
Help file can be used as a resource
OR
place the help file where in same directory as your executable
OR
use Oneclick distribution option
OR
Create an MSI file and include in MSI file
--

Use the following command to to define path of help file

HelpProvider1.HelpNamespace =
System.AppDomain.CurrentDomain.BaseDirectory & "HELPFILE.chm"

Place the help file in the BIN/DEBUG or BIN/RELEASE folder
Hope this helps!

Alam
co*****@ntlworld.com
lo*********@gmail.com wrote:
I've managed to get a nice little chm help system written. Now I need
to display it!
I added a HelpProvider to my MDIParent form and set the namespace of
the HelpProvider to be the help file. So far so good - when I press F1,
I get HTML Help popping up with my Help file.
This is good but I've been requested to make Help pop up when the user
clicks on "Help" in the menu, or on a specific Help Button. I'm trying
to trigger the HelpRequested event for the parent form, but I'm not
sure how to do this.
Another question: How does the help file get distributed when I publish
the application and install it on site? I'm guessing I'll have to add
it as a project Resource, but I'm not sure if that will work... will
it? Right now it just seems to work nicely, but I haven't tried
installing on another machine yet.
Finally (this one's probably the most minor): when the help file loads,
it always says "Could not find file" (or something like that), and the
root-level category is selected. The user has to actually click the
root-level category to see its text. I'm pretty sure this is just a
configuration problem, but I can't seem to find anything to solve it.

TIA.
Dec 8 '06 #2
Assuming the following is in your help drop down menu
Contents
Index
Search

use the following for contents

Private Sub ContentsToolStripMenuItem_Click(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
ContentsToolStripMenuItem.Click
' Contents dropdown menu
Help.ShowHelp(Me, HelpProvider1.HelpNamespace)

End Sub

--- for index
Private Sub IndexToolStripMenuItem_Click(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
IndexToolStripMenuItem.Click
Help.ShowHelpIndex(Me, HelpProvider1.HelpNamespace)
End Sub
-- for search
Private Sub SearchToolStripMenuItem_Click(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
SearchToolStripMenuItem.Click
Help.ShowHelp(Me, HelpProvider1.HelpNamespace,
HelpNavigator.Find, "")
End Sub
--Distribution of help file
Help file can be used as a resource
OR
place the help file where in same directory as your executable
OR
use Oneclick distribution option
OR
Create an MSI file and include in MSI file
--

Use the following command to to define path of help file

HelpProvider1.HelpNamespace =
System.AppDomain.CurrentDomain.BaseDirectory & "HELPFILE.chm"

Place the help file in the BIN/DEBUG or BIN/RELEASE folder
Hope this helps!

Alam
co*****@ntlworld.com
lo*********@gmail.com wrote:
I've managed to get a nice little chm help system written. Now I need
to display it!
I added a HelpProvider to my MDIParent form and set the namespace of
the HelpProvider to be the help file. So far so good - when I press F1,
I get HTML Help popping up with my Help file.
This is good but I've been requested to make Help pop up when the user
clicks on "Help" in the menu, or on a specific Help Button. I'm trying
to trigger the HelpRequested event for the parent form, but I'm not
sure how to do this.
Another question: How does the help file get distributed when I publish
the application and install it on site? I'm guessing I'll have to add
it as a project Resource, but I'm not sure if that will work... will
it? Right now it just seems to work nicely, but I haven't tried
installing on another machine yet.
Finally (this one's probably the most minor): when the help file loads,
it always says "Could not find file" (or something like that), and the
root-level category is selected. The user has to actually click the
root-level category to see its text. I'm pretty sure this is just a
configuration problem, but I can't seem to find anything to solve it.

TIA.
Dec 8 '06 #3
I didn't know about the Help class. Thanks for the tip!

Dec 8 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by wugon.net | last post: by
2 posts views Thread by lenygold via DBMonster.com | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.