Compiled HTML helpfile does not work when application is installed

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Christie

    #1

    Compiled HTML helpfile does not work when application is installed

    My problem is that I am using a compiled HTML helpfile (.chm) for my
    application help. I have copied the file to the bin directory and the
    helpprovider component is pointing to the .chm file.

    The code in the help button that displays the help is as follows:

    Help.ShowHelp(M e,HelpProvider1 .HelpNamespace)

    It is working fine when I test the program, but once I publish it and
    install it on another pc nothing happens when the help button is
    clicked (not even an error message, nothing). This is very
    frustrating.

    Please point me in the right direction.

    I am using Visual Studio 2005 (VB.Net).

    Cheers

  • Peter Macej

    #2
    Re: Compiled HTML helpfile does not work when application is installed

    It is very likely that CHM file on the target computer cannot be found.
    Note that the system doesn't look in application's folder. Do you
    specify the absolute full path to the CHM file? If not, do it on program
    startup. Something like:

    HelpProvider1.H elpNamespace =
    IO.Path.Combine (System.Reflect ion.Assembly.Ge tExecutingAssem bly.Location,
    "myHelpFile.chm ")


    --
    Peter Macej
    Helixoft - http://www.helixoft.com
    VSdocman - Commenter and generator of class documentation for C#, VB
    ..NET and ASP .NET code

    Comment

    • Christie

      #3
      Re: Compiled HTML helpfile does not work when application is installed

      I have tried it with your code, but now I cannot get it to run, even
      when I am debugging...I think my file is not located in the correct
      area..
      is the code that you gave my the only way to get the application path??


      Peter Macej wrote:
      It is very likely that CHM file on the target computer cannot be found.
      Note that the system doesn't look in application's folder. Do you
      specify the absolute full path to the CHM file? If not, do it on program
      startup. Something like:
      >
      HelpProvider1.H elpNamespace =
      IO.Path.Combine (System.Reflect ion.Assembly.Ge tExecutingAssem bly.Location,
      "myHelpFile.chm ")
      >
      >
      --
      Peter Macej
      Helixoft - http://www.helixoft.com
      VSdocman - Commenter and generator of class documentation for C#, VB
      .NET and ASP .NET code

      Comment

      • Peter Macej

        #4
        Re: Compiled HTML helpfile does not work when application is installed

        Christie wrote / napísal(a):
        I have tried it with your code, but now I cannot get it to run, even
        when I am debugging...I think my file is not located in the correct
        area..
        is the code that you gave my the only way to get the application path??
        I wrote the code from my memory. I forgot to get directory from
        location. It should be:

        HelpProvider1.H elpNamespace
        =IO.Path.Combin e(IO.Path.GetDi rectoryName(Sys tem.Reflection. Assembly.GetExe cutingAssembly. Location),
        "myHelpFile.chm ")

        This works for me.

        --
        Peter Macej
        Helixoft - http://www.helixoft.com
        VSdocman - Commenter and generator of class documentation for C#, VB
        ..NET and ASP .NET code

        Comment

        • Christie

          #5
          Re: Compiled HTML helpfile does not work when application is installed

          OK..I will try this...

          One more question (a stupid one, I know) must I then have the .chm file
          in the same directory as the program, or within one of the subfolders??


          Peter Macej wrote:
          Christie wrote / napísal(a):
          I have tried it with your code, but now I cannot get it to run, even
          when I am debugging...I think my file is not located in the correct
          area..
          is the code that you gave my the only way to get the application path??
          >
          I wrote the code from my memory. I forgot to get directory from
          location. It should be:
          >
          HelpProvider1.H elpNamespace
          =IO.Path.Combin e(IO.Path.GetDi rectoryName(Sys tem.Reflection. Assembly.GetExe cutingAssembly. Location),
          "myHelpFile.chm ")
          >
          This works for me.
          >
          --
          Peter Macej
          Helixoft - http://www.helixoft.com
          VSdocman - Commenter and generator of class documentation for C#, VB
          .NET and ASP .NET code

          Comment

          • Peter Macej

            #6
            Re: Compiled HTML helpfile does not work when application is installed

            One more question (a stupid one, I know) must I then have the .chm file
            in the same directory as the program, or within one of the subfolders??
            You can place the CHM file anywhere you want. But you always need to set
            the full path so that your program can find it.

            --
            Peter Macej
            Helixoft - http://www.helixoft.com
            VSdocman - Commenter and generator of class documentation for C#, VB
            ..NET and ASP .NET code

            Comment

            Working...