-
Hi all,
How could I get the short name of a picture? (without the directory info)
I tried ImageMenu1.Picture = ImageMenu1Name but it recovered a number. I have the image Dim-ed as an Object, so what do I do? It has to be an Object, I have no alternative.
Thanks. =)
-Git
-
This will return the short name of a file.
Code:
shortName = Right$(strfullname, Len(strfullname) - InStrRev(strfullname, "\"))
-
Thanks. But how do I recover the filname? I try but I keep getting a number (it's an image).
-
I mean, I can't recover ANY of the filename, I only get a number..
Please help! =(
-
What do you mean by getting filename? Do you want to get it from the path? (C:\Windows\MyPic.bmp) or do you want to get it from a PictureBox that already has a Picture loaded?
If you want to get it from the PictureBox, I don't think you can. The pixels have already been drawen and I don't think there is any reference to the original filename in it.
-
Yeah, I meant getting the filename of the pic that's been drawn.
Ahwell, gotta redesign part of the prog then.
Thanks. =)
-Git