如何在代码中将图片设置为PictureBox?
下面的代码给我错误:
无法将位图隐式转换为
串。
private void ptbLocalidadAdd_MouseEnter(object sender, EventArgs e)
{
ptbLocalidadAdd.ImageLocation = Properties.Resources.addg;
}
最佳答案
如果资源是位图,这应该起作用:
ptbLocalidadAdd.Image = Properties.Resources.addg;