Solved

Getting the image and path from a picturebox?

Posted on 2004-09-19
2
314 Views
Last Modified: 2010-04-15
I was wondering if it's possible to pull the image and the path out of a picturebox.  Basically, I have a picturebox in my C# windows app called astrologyPic.  Is there some way to get the filename out of this using code?  For example, can I call a function like astrologyPic.image.Filename and have it return C:\Images\imagename.jpg?  Any help on this would be greatly appreciated.
0
Comment
Question by:DragXSlay
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 10

Accepted Solution

by:
eternal_21 earned 50 total points
ID: 12099001
No, there is no way to do this.  The PictureBox control is independant of the file system, and loads a System.Drawing.Image object without any prerequisite for source (i.e.: Image can be from file, memory, or network, etc.).  If your PictureBox is being loaded with an image from the hard drive, I suggest your save the file name in a variable, and then you may refer to this later.
0
 
LVL 7

Expert Comment

by:5thcav
ID: 14333955
old question?

why not set the picturebox1.Tag =("filename and path..") then simply pull it out?
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question