我有以下代码
namespace Spaceship_Invaders
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
Image myImage = Image.FromFile("image/Untitled.png");
pictureBox1.Image = myImage;
}
public class spaceship {
Image myimage = Image.FromFile("image/Untitled6.png");
Form1 myform = new Form1();
myform.pictureBox1.Image = myimage;
}
}
}
我的表格中有一个图片框,我想从类宇宙飞船访问图片框,但我无法访问它。这该怎么做?