get name of picture?
The image loaded in PictureBox
is just an array of bytes,
so to find out what is the filename you must fill the Tag
property of PictureBox
when any image loaded in it.
An Image
object only contains the image's binary data. You can manually set the Tag
property of the Image
to contain the file name (After you've created the image).
If you load an image to the PictureBox
using the Load()
method, that will update the PictureBox
's ImageLocation
property to the file's path.
Then you can use pictureBox4.ImageLocation
for comparison.
ImageLocation on MSDN