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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Returning the Filename of a current Image..

Status
Not open for further replies.

YoshiCD

Programmer
Feb 24, 2001
96
ES
How do I return the filename of a current image in VB4 Enterprise...??

If i use the image1.picture method, i appear to get numbers, I have also tried prefixing this with "str", "chr" and just about every other prefix you can think of.. Is there a way... if so, will someone please help me.. (i'm melting).... Cheers all..... ¥oshi ?!?
 
Hello Yoshi,

You can try using a picturebox ( i am not sure if it is part of the visual basic 4) but if you can not then try adding a value at the tag property of the image box ( iknow that this is not a "stylish" solution but it can help you get over with your problem)

For example you can create a function to load the the picture to the picture box something like:

private function LoadImg(byval filename as string)
image1.picture=loadpicture(filename)
image1.tag=filename
end function


So when you like to find out the name of the picture that is currently loaded you just read the value of the image1.tag

I hope that this will help you
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top