I am creating a path inside C # so I can always call images from this path, I am instantiating a reference ( using namespace.Properties
) and through it I am able to call Resources
and using the following code:
var myIcon = (Bitmap)Resources.imagem;
But even so within the pictureBox it does not work, it gives the following error:
Can not implicitly convert type 'System.Drawing.Bitmap' to 'System.Windows.Forms.PictureBox' c: \ users \ Lucas \ documents \ visual studio 2015 \ Projects \ test \ test \ / p>
Attempt to call the image:
var myIcon = (Bitmap)Resources.imagem;
pictureBox1 = myIcon;
I want inside this pictureBox
I can call my image that I'm already calling through Resources
, but how can I fix this error?