displaying resource file as Help

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

    #1

    displaying resource file as Help

    Hello,
    I have a help file as a chm, which is added to the project as a
    resource. I'm trying to display it as
    System.Windows. Forms.Help.Show Help(Me, "Name_Of_Helpfi le_Resource")
    which obviously does not work (It cannot find anything at that URL).
    Is there a way to do this?

  • vbnetdev

    #2
    Re: displaying resource file as Help

    You want to leave these files out of your project in my opinion.

    ' Visual Basic
    ' This method takes parameters from the client application that allow
    ' the developer to specify when Help is displayed.
    Public Sub DisplayHelp (ByVal parent as System.Windows. Forms.Control, _
    ByVal topic as MyHelpEnum)
    ' The file to display is chosen by the value of the topic
    ' parameter.
    Select Case topic
    Case MyHelpEnum.enum Widgets
    Windows.Forms.H elp.ShowHelp(pa rent, "C:\Help\Widget s.chm")
    Case MyHelpEnum.enum Mechanisms
    ' Insert code to implement additional functionality.
    End Select
    End Sub

    <lord.zoltar@gm ail.comwrote in message
    news:1166711951 .761350.258680@ 79g2000cws.goog legroups.com...
    Hello,
    I have a help file as a chm, which is added to the project as a
    resource. I'm trying to display it as
    System.Windows. Forms.Help.Show Help(Me, "Name_Of_Helpfi le_Resource")
    which obviously does not work (It cannot find anything at that URL).
    Is there a way to do this?
    >

    Comment

    • lord.zoltar@gmail.com

      #3
      Re: displaying resource file as Help


      vbnetdev wrote:
      You want to leave these files out of your project in my opinion.
      >
      Yeah I think you may be right about that I've tried a number of tricks,
      and none of them really worked well...
      Ok so here's the next problem: if I can't include the chm in the
      project resources, how can I ensure the location in the filesystem that
      will be installed at? The best place, I think would to just install it
      in the same location as the executable file. I thought I could add it
      through the Application Files (in "Project Settings -Publish"), but I
      can't. The program is being deployed throught ClickOnce, and I can't
      seem to find much on how to control the install locations of files.

      Comment

      • vbnetdev

        #4
        Re: displaying resource file as Help

        Yes in that case place them in your bin folder and use teh
        application.sta rtupPath placeholder to verify your contents are picked up
        correctly. Whereever it is installed, here they will find it.

        Now are you asking me in the setup project of how to force a install to a
        certain path?

        <lord.zoltar@gm ail.comwrote in message
        news:1166801316 .601128.35010@h 40g2000cwb.goog legroups.com...
        >
        vbnetdev wrote:
        >You want to leave these files out of your project in my opinion.
        >>
        Yeah I think you may be right about that I've tried a number of tricks,
        and none of them really worked well...
        Ok so here's the next problem: if I can't include the chm in the
        project resources, how can I ensure the location in the filesystem that
        will be installed at? The best place, I think would to just install it
        in the same location as the executable file. I thought I could add it
        through the Application Files (in "Project Settings -Publish"), but I
        can't. The program is being deployed throught ClickOnce, and I can't
        seem to find much on how to control the install locations of files.
        >

        Comment

        • vbnetdev

          #5
          Re: displaying resource file as Help

          There is a section in the setup package that allows you "include files". I
          would create a folder, put them in there and reference them with
          Application.Sta rtupPath with your folder name.

          <lord.zoltar@gm ail.comwrote in message
          news:1166801316 .601128.35010@h 40g2000cwb.goog legroups.com...
          >
          vbnetdev wrote:
          >You want to leave these files out of your project in my opinion.
          >>
          Yeah I think you may be right about that I've tried a number of tricks,
          and none of them really worked well...
          Ok so here's the next problem: if I can't include the chm in the
          project resources, how can I ensure the location in the filesystem that
          will be installed at? The best place, I think would to just install it
          in the same location as the executable file. I thought I could add it
          through the Application Files (in "Project Settings -Publish"), but I
          can't. The program is being deployed throught ClickOnce, and I can't
          seem to find much on how to control the install locations of files.
          >

          Comment

          • lord.zoltar@gmail.com

            #6
            Re: displaying resource file as Help


            vbnetdev wrote:
            There is a section in the setup package that allows you "include files". I
            would create a folder, put them in there and reference them with
            Application.Sta rtupPath with your folder name.
            >
            Hmm somehow I can't seem to find it... :(
            the closest I've gotten is the "Applicatio n Files" in the project's
            Properties page. It shows me the files I can include or exclude, but I
            can't add NEW files to this list - right now it just shows files such
            as "myApp.exe" .
            I'm using VB .NET Express for this project...

            Comment

            • vbnetdev

              #7
              Re: displaying resource file as Help

              Oh that changes things a bit. I don't think you have the setup wizard. In
              the setup project can you right click on the project name and select view,
              filesystem?

              If so under application folder place your folder with the help files there.
              (right click on Application Folder and select "Add Folder")

              <lord.zoltar@gm ail.comwrote in message
              news:1166820996 .945939.185400@ 73g2000cwn.goog legroups.com...
              >
              vbnetdev wrote:
              >There is a section in the setup package that allows you "include files".
              >I
              >would create a folder, put them in there and reference them with
              >Application.St artupPath with your folder name.
              >>
              >
              Hmm somehow I can't seem to find it... :(
              the closest I've gotten is the "Applicatio n Files" in the project's
              Properties page. It shows me the files I can include or exclude, but I
              can't add NEW files to this list - right now it just shows files such
              as "myApp.exe" .
              I'm using VB .NET Express for this project...
              >

              Comment

              • lord.zoltar@gmail.com

                #8
                Re: displaying resource file as Help


                vbnetdev wrote:
                Oh that changes things a bit. I don't think you have the setup wizard. In
                the setup project can you right click on the project name and select view,
                filesystem?
                >
                If so under application folder place your folder with the help files there.
                (right click on Application Folder and select "Add Folder")
                By "setup project", do you mean the project's Properties?

                when you say to right-click the project name, that makes sense if
                you're talking about the Solution Explorer... When I'm in the Solution
                Explorer, I can right-click the project name and select "Add -New
                Folder". Of course, I can already see the chm file in the Solution
                Explorer.
                *sigh* so much easier with a makefile... hmm, is there some file I
                could manually edit to get the chm to be included in the installation?

                Comment

                • vbnetdev

                  #9
                  Re: displaying resource file as Help

                  No I dont mean this. Trying to compile some screenshots for you so stand by.

                  <lord.zoltar@gm ail.comwrote in message
                  news:1166822692 .372866.130090@ 42g2000cwt.goog legroups.com...
                  >
                  vbnetdev wrote:
                  >Oh that changes things a bit. I don't think you have the setup wizard. In
                  >the setup project can you right click on the project name and select
                  >view,
                  >filesystem?
                  >>
                  >If so under application folder place your folder with the help files
                  >there.
                  >(right click on Application Folder and select "Add Folder")
                  >
                  By "setup project", do you mean the project's Properties?
                  >
                  when you say to right-click the project name, that makes sense if
                  you're talking about the Solution Explorer... When I'm in the Solution
                  Explorer, I can right-click the project name and select "Add -New
                  Folder". Of course, I can already see the chm file in the Solution
                  Explorer.
                  *sigh* so much easier with a makefile... hmm, is there some file I
                  could manually edit to get the chm to be included in the installation?
                  >

                  Comment

                  • lord.zoltar@gmail.com

                    #10
                    Re: displaying resource file as Help


                    vbnetdev wrote:
                    No I dont mean this. Trying to compile some screenshots for you so stand by.
                    >
                    no no never mind!
                    I got what I needed. I selected the file in the Solution Explorer, then
                    selected the properties *for the file*! ...Then set the Build Type to
                    Content, then set the Copile Action to "Copy if newer"... Maybe that
                    wasn't what you meant either, but it got the job done.

                    Comment

                    • lord.zoltar@gmail.com

                      #11
                      Re: displaying resource file as Help

                      >
                      no no never mind!
                      I got what I needed. I selected the file in the Solution Explorer, then
                      selected the properties *for the file*! ...Then set the Build Type to
                      Content, then set the Copile Action to "Copy if newer"... Maybe that
                      wasn't what you meant either, but it got the job done.
                      Sorry, "Build Type" should have read "Build Action" and "Compile
                      Action" should have read "Copy to Output Directory"...
                      thanks for all though! ;)

                      Comment

                      • vbnetdev

                        #12
                        Re: displaying resource file as Help



                        You should have two projects in your view in VS. One is a setup project and
                        the other your solution right?

                        <lord.zoltar@gm ail.comwrote in message
                        news:1166822692 .372866.130090@ 42g2000cwt.goog legroups.com...
                        >
                        vbnetdev wrote:
                        >Oh that changes things a bit. I don't think you have the setup wizard. In
                        >the setup project can you right click on the project name and select
                        >view,
                        >filesystem?
                        >>
                        >If so under application folder place your folder with the help files
                        >there.
                        >(right click on Application Folder and select "Add Folder")
                        >
                        By "setup project", do you mean the project's Properties?
                        >
                        when you say to right-click the project name, that makes sense if
                        you're talking about the Solution Explorer... When I'm in the Solution
                        Explorer, I can right-click the project name and select "Add -New
                        Folder". Of course, I can already see the chm file in the Solution
                        Explorer.
                        *sigh* so much easier with a makefile... hmm, is there some file I
                        could manually edit to get the chm to be included in the installation?
                        >

                        Comment

                        • vbnetdev

                          #13
                          Re: displaying resource file as Help

                          OK well I am glad it is resolved. I hoped I helped in some way.

                          Kelly

                          <lord.zoltar@gm ail.comwrote in message
                          news:1166823370 .334553.4150@48 g2000cwx.google groups.com...
                          >
                          >>
                          >no no never mind!
                          >I got what I needed. I selected the file in the Solution Explorer, then
                          >selected the properties *for the file*! ...Then set the Build Type to
                          >Content, then set the Copile Action to "Copy if newer"... Maybe that
                          >wasn't what you meant either, but it got the job done.
                          >
                          Sorry, "Build Type" should have read "Build Action" and "Compile
                          Action" should have read "Copy to Output Directory"...
                          thanks for all though! ;)
                          >

                          Comment

                          Working...