Loading pictures to a form

karim

Member
Joined
Feb 25, 2008
Messages
9
Programming Experience
Beginner
Hi everyone, I have a form with 1 txt, 1 btn, and 1 image frame. what I'm trying to do is set the form to open pictures from a specific folder. and when I type the name of one of the pictures in the txt box and hit the btn, it display it in to the form were the image frame is. would anyone have an idea on how to do that? thank you
 
Why would you want to terrorize your users in such a way? Typing filenames in a textbox is strictly forbidden as file selection UI. Here are two options:
  1. Use a OpenFileDialog for the user to select which image is to be displayed.
  2. Use a FolderBrowserDialog for user to select folder, fill a ComboBox with the image filenames for user to select.
Browsing the memberlist of Picturebox class you will find out how to load an image, you will find the Image property with code sample.
 
Back
Top