putting pictures in a picture box

the sheriff

New member
Joined
Nov 27, 2006
Messages
3
Programming Experience
Beginner
Hello,

i want to put put a different picture in my picture box depending on what is selected.

the code i have is pic1.backgroundimage = image.fromfile("c:\car")

i dont want to have to store the pictures in the c:\

i put the images in my Bin and changed the code to...

pic1.backgroundimage = image.fromfile("car")

but this does not work

how do i tell it to get the picture from the Bin so when it publishes the pictures are incled in the program and the user doesnt have to put them in their c:\

thanks!!
 
Add them to your resources:

Click Project > [Project Name] Properties
Click Resources on the tab strip to the left, Add Resource drop-down, Add existing item.

Then in your code pic1.backgroundimage = my.resources.imagename
 
Back
Top