该代码和图片没有出现任何错误或没有消息吗?只是打开面板上的屏幕,但图片没有
public static void Create(Button[,] board)
{
PictureBox[] BlackpawnsPictureboxes = new PictureBox[8];
const int tileSize = 50;
var newPictureBox = new PictureBox
{
Size = new Size(tileSize, tileSize),
};
for (var m = 0; m < 8; m++)
{
BlackpawnsPictureboxes[m] = newPictureBox;
BlackpawnsPictureboxes[m].Location = board[1, m].Location;
BlackpawnsPictureboxes[m].Image = Image.FromFile(@"C:\Users\USER\source\repos\chess\chess\piece\white\pown.jpg");
BlackpawnsPictureboxes[m].Visible = true;
BlackpawnsPictureboxes[m].BringToFront();
}
}