By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,859 Members | 1,859 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,859 IT Pros & Developers. It's quick & easy.

Trigger a Help event.

P: n/a
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
Share this Question
Share on Google+
3 Replies


P: n/a
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

P: n/a
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

P: n/a
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.