How to find icons to use with Treeview Control

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sphinney
    New Member
    • Mar 2007
    • 69

    How to find icons to use with Treeview Control

    Hello. I'm using a treeview control on my Access 2007 form. The treeview will be used to show the directory structure of a given file path. I've been able to successfully populate the nodes on the treeview. What I don't know how to do is locate the appropriate icons to place next to the nodes. Or, put another way, how to I query local computer's OS to find out which icon goes with each file?

    For example, I want to display folder icon next to directories, a Microsoft Access icon next to Access files, and an Excel icon next to Excel files ... just like Windows Explorer does.

    I don't need the complete code (although that would be nice), just a point in the right direction. An API call maybe?

    I've researched previous posts at this site and looked at the Howtos, but I didn't see anything that demostrated how to find the icons (just load up the nodes, which I can already do).

    Also, can anyone send me the help files for the Windows Common Controls? They're supposed to come with Windows XP (like the controls do) but I don't have them. I guess this is a common problem. The files are:
    cmctl198.chm
    cmctl198.chi



    Thanks,
    sphinney
  • FishVal
    Recognized Expert Specialist
    • Jun 2007
    • 2656

    #2
    Hello, sphinney.

    A brief googling gives:



    Quite enough to start from.

    Regards,
    Fish

    Comment

    • ADezii
      Recognized Expert Expert
      • Apr 2006
      • 8834

      #3
      The easiest and most efficient means to utilize Icons with the TreeView Control is to:
      1. Load all your Icons into an ImageList Control.
      2. Set the ImageList Property of the TreeView Control to the Name of the ImageList Control.
      3. Specify the appropriate Icons as Index Numbers into the Images contained in the ImageList Control as the 5th (Image) and/or 6th (Selected Image) Arguments to the Add Method of the Node Object.

      Comment

      • sphinney
        New Member
        • Mar 2007
        • 69

        #4
        Originally posted by ADezii
        The easiest and most efficient means to utilize Icons with the TreeView Control is to:
        1. Load all your Icons into an ImageList Control.
        2. Set the ImageList Property of the TreeView Control to the Name of the ImageList Control.
        3. Specify the appropriate Icons as Index Numbers into the Images contained in the ImageList Control as the 5th (Image) and/or 6th (Selected Image) Arguments to the Add Method of the Node Object.
        Thanks, ADezii. Any idea's on how to get the help file for the Windows Common Controls? The help file covers both the Treeview and the Imagelist controls. The files I need are: cmctl198.chm and cmctl198.chi. I can't seem to find them anywhere on the web. Googling on the filename will give me lots of hits. But all the sites with the files don't seem to come up. Microsoft just says the help files come with FoxPro (I only have plain old Access).

        FishVal - Thanks for the links. I wan't even sure what text to use for a google search.

        Thanks,
        sphinney

        Comment

        • ADezii
          Recognized Expert Expert
          • Apr 2006
          • 8834

          #5
          Originally posted by sphinney
          Thanks, ADezii. Any idea's on how to get the help file for the Windows Common Controls? The help file covers both the Treeview and the Imagelist controls. The files I need are: cmctl198.chm and cmctl198.chi. I can't seem to find them anywhere on the web. Googling on the filename will give me lots of hits. But all the sites with the files don't seem to come up. Microsoft just says the help files come with FoxPro (I only have plain old Access).

          FishVal - Thanks for the links. I wan't even sure what text to use for a google search.

          Thanks,
          sphinney
          Not sure, but I will look into it.

          Comment

          • ADezii
            Recognized Expert Expert
            • Apr 2006
            • 8834

            #6
            Originally posted by sphinney
            Thanks, ADezii. Any idea's on how to get the help file for the Windows Common Controls? The help file covers both the Treeview and the Imagelist controls. The files I need are: cmctl198.chm and cmctl198.chi. I can't seem to find them anywhere on the web. Googling on the filename will give me lots of hits. But all the sites with the files don't seem to come up. Microsoft just says the help files come with FoxPro (I only have plain old Access).

            FishVal - Thanks for the links. I wan't even sure what text to use for a google search.

            Thanks,
            sphinney
            spinney, here is an early Christmas Gift!

            Comment

            • TheSmileyCoder
              Recognized Expert Moderator Top Contributor
              • Dec 2009
              • 2322

              #7
              If anyone has copies of those files, I would very very very much like a copy.

              Comment

              • ADezii
                Recognized Expert Expert
                • Apr 2006
                • 8834

                #8
                Here you go, TheSmileyOne:
                Attached Files

                Comment

                • TheSmileyCoder
                  Recognized Expert Moderator Top Contributor
                  • Dec 2009
                  • 2322

                  #9
                  Thank you!

                  Comment

                  Working...