Images

Simon4VB

Member
Joined
Apr 2, 2009
Messages
23
Programming Experience
1-3
Usually to open an image I use
PictureBox1.Image = Image.FromFile("C:\Users\Simon\Desktop\Image.jpg")

I have a picturebox, a text box and a button. My intention is to input the image name in the textbox and the image opens according to the image name input in the textbox when the button is pressed.
Any help how to do it please.
Thanks in advance
 
Exactly as you've shown. You pass the path of the file to Image.FromFile. If the path of the file is in a TextBox then you get the Text of the TextBox and pass it to the FromFile method.
 

Latest posts

Back
Top