By name, do you mean the path to the image? I can't see how just "MyPicture.jpg" would work.
If you are using the whole path, then for "data-binding", you would need to create a custom class an inherit from PictureBox. The image property of a PictureBox takes a System.Drawing.Image. But you have a string object from your database.
So create the new class, add an "ImagePath" property, and in the setter of that, set the Image property to an Image.FromFile("abc..."). Then, you can use DataBindings.Add("ImagePath", DataObject)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.