Solved

read filename from TPicture

Posted on 2003-11-07
3
168 Views
Last Modified: 2010-04-05
hi...

i can't find the way to extract the filename of the associated file of a TPicture...

i assign the file with something like:

img := TPicture.Create;
img.LoadFromFile('the_file');

but i need to extract that filename... how do i do that?

thank u for your answers.
0
Comment
Question by:corsita
[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
3 Comments
 
LVL 12

Accepted Solution

by:
andrewjb earned 50 total points
ID: 9703469
A TImage doesn't remember where it loaded from. You'll have to store it separately somewhere, or derive a new component from TImage

0
 

Author Comment

by:corsita
ID: 9709310
really? ... that's weird...

ok thanks for that!
0
 
LVL 5

Expert Comment

by:Hypoviax
ID: 9711858
How about when you load the file you save the file path to a variable named something like:

            picfilename

...as a string of course

Then when you want the filename simply refer to this variable.

Regards,

Hypoviax
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

Suggested Solutions

Title # Comments Views Activity
how to center only a line in richedit? 4 78
Strange behavior when a form is closed 6 77
LAN or WAN ? 11 119
Problem working with dynamic array - help 2 48
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…

734 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