How can I set a picture to a PictureBox in code?
The code below gives me the error:
Cannot implicitly convert Bitmap to String.
private void ptbLocalidadAdd_MouseEnter(object sender, EventArgs e)
开发者_开发技巧 {
ptbLocalidadAdd.ImageLocation = Properties.Resources.addg;
}
If the resource is a bitmap, this should work:
ptbLocalidadAdd.Image = Properties.Resources.addg;
精彩评论