Solved

Getting the image and path from a picturebox?

Posted on 2004-09-19
2
300 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
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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

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…
We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

776 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