Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Image Path From Image List

Image Path From Image List

Scheduled Pinned Locked Moved C#
5 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    vayanan
    wrote on last edited by
    #1

    Hi all... is there any way to get path of the image from imageList.... Regards Vayanan

    C N 2 Replies Last reply
    0
    • V vayanan

      Hi all... is there any way to get path of the image from imageList.... Regards Vayanan

      C Offline
      C Offline
      C1AllenS
      wrote on last edited by
      #2

      Hi, ImageList is only used to store images. It does not have the option to return the actual path of the images. Regards, Allen

      Allen Smith ComponentOne LLC www.componentone.com

      L 1 Reply Last reply
      0
      • C C1AllenS

        Hi, ImageList is only used to store images. It does not have the option to return the actual path of the images. Regards, Allen

        Allen Smith ComponentOne LLC www.componentone.com

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        Correct. One option to circumvent this problem might be to add the file path of the image into the Tag property of the Image instance, something like:

        Image someImage = Image.FromFile(filepath);
        someImage.Tag = filepath;

        imageList.Add(someImage);

        This might cause problems though when the user renames/deletes/moves the actual image while the application is running. But this could be handled using a FileSystemWatcher to react to these actions. regards

        V 1 Reply Last reply
        0
        • L Lost User

          Correct. One option to circumvent this problem might be to add the file path of the image into the Tag property of the Image instance, something like:

          Image someImage = Image.FromFile(filepath);
          someImage.Tag = filepath;

          imageList.Add(someImage);

          This might cause problems though when the user renames/deletes/moves the actual image while the application is running. But this could be handled using a FileSystemWatcher to react to these actions. regards

          V Offline
          V Offline
          vayanan
          wrote on last edited by
          #4

          Thanks Alot... Regards Vayanan

          1 Reply Last reply
          0
          • V vayanan

            Hi all... is there any way to get path of the image from imageList.... Regards Vayanan

            N Offline
            N Offline
            nelsonpaixao
            wrote on last edited by
            #5

            path??? there is none. Are you thinking of uploading pictures to a database? search here int the articles, there is plenty of info. Good luck :-\

            nelsonpaixao@yahoo.com.br

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups