How to get an image of a resource

5

I want to call a picture with a button in Visual Basic 2010 Express , in Visual Basic 2008 , I used this code:

picMyimage.image = My.resource.onomedaimagen

Until then it worked as it wished, however in Visual Basic 2010 is not working, wanted to know how to call an image by the button with this new version.

    
asked by anonymous 08.02.2016 / 11:49

1 answer

3

To get an image of Resource and Add in the PictureBox, do as follows:

On the button's OnClick put:

{ pictureBox1.Image = Properties.Resources.Untitledd; }

// Unitledd is the name of the image that is saved in the resource

    
08.02.2016 / 12:12