?
Solved

Getting the image and path from a picturebox?

Posted on 2004-09-19
2
Medium Priority
?
323 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 200 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction Although it is an old technology, serial ports are still being used by many hardware manufacturers. If you develop applications in C#, Microsoft .NET framework has SerialPort class to communicate with the serial ports.  I needed to…
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

752 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