Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Return value of the picture property of a picture box control 1

Status
Not open for further replies.

jbrowne

Programmer
Feb 1, 2000
182
IE
Hi, I am trying to get the return value at runtime of the picture property of a picturebox control. What I want to do is save the name of the image in the picturebox into a string but when I try to do the following;
MyString = Picture1.picture
All I get is a 9 digit number. How can I get the name of the image returned from the picture property.

Thanks
John B
 
Picture objects, once loaded, don't have filenames I'm afraid.
 
So there is no way of finding out the name of the image held in the picture box at runtime?
 
Depends how you get the image into the picturebox...

HarleyQuinn
---------------------------------
Help us to help you,
read FAQ222-2244 before posting.
 
I am using the "LoadPicture" function in the code
 
In which case you should be able to capture the filename at that point and, say, stick it into the picturebox .tag property
 
Brilliant idea - thanks for that "strongm
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top