Trigger a Help event.

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • lord.zoltar@gmail.com

    #1

    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.

  • Alam

    #2
    Re: Trigger a Help event.

    Assuming the following is in your help drop down menu
    Contents
    Index
    Search

    use the following for contents

    Private Sub ContentsToolStr ipMenuItem_Clic k(ByVal sender As
    System.Object, ByVal e As System.EventArg s) Handles
    ContentsToolStr ipMenuItem.Clic k
    ' Contents dropdown menu
    Help.ShowHelp(M e, HelpProvider1.H elpNamespace)

    End Sub

    --- for index
    Private Sub IndexToolStripM enuItem_Click(B yVal sender As
    System.Object, ByVal e As System.EventArg s) Handles
    IndexToolStripM enuItem.Click
    Help.ShowHelpIn dex(Me, HelpProvider1.H elpNamespace)
    End Sub
    -- for search
    Private Sub SearchToolStrip MenuItem_Click( ByVal sender As
    System.Object, ByVal e As System.EventArg s) Handles
    SearchToolStrip MenuItem.Click
    Help.ShowHelp(M e, HelpProvider1.H elpNamespace,
    HelpNavigator.F ind, "")
    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.H elpNamespace =
    System.AppDomai n.CurrentDomain .BaseDirectory & "HELPFILE.c hm"

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

    Alam
    comsoft@ntlworl d.com


    lord.zoltar@gma il.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.

    Comment

    • Alam

      #3
      Re: Trigger a Help event.

      Assuming the following is in your help drop down menu
      Contents
      Index
      Search

      use the following for contents

      Private Sub ContentsToolStr ipMenuItem_Clic k(ByVal sender As
      System.Object, ByVal e As System.EventArg s) Handles
      ContentsToolStr ipMenuItem.Clic k
      ' Contents dropdown menu
      Help.ShowHelp(M e, HelpProvider1.H elpNamespace)

      End Sub

      --- for index
      Private Sub IndexToolStripM enuItem_Click(B yVal sender As
      System.Object, ByVal e As System.EventArg s) Handles
      IndexToolStripM enuItem.Click
      Help.ShowHelpIn dex(Me, HelpProvider1.H elpNamespace)
      End Sub
      -- for search
      Private Sub SearchToolStrip MenuItem_Click( ByVal sender As
      System.Object, ByVal e As System.EventArg s) Handles
      SearchToolStrip MenuItem.Click
      Help.ShowHelp(M e, HelpProvider1.H elpNamespace,
      HelpNavigator.F ind, "")
      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.H elpNamespace =
      System.AppDomai n.CurrentDomain .BaseDirectory & "HELPFILE.c hm"

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

      Alam
      comsoft@ntlworl d.com


      lord.zoltar@gma il.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.

      Comment

      • lord.zoltar@gmail.com

        #4
        Re: Trigger a Help event.

        I didn't know about the Help class. Thanks for the tip!

        Comment

        Working...