I have following code
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;
}
}
}
I have a picturebox in the form and I want to access the picturebox from the class spaceship but i can not access it. How to do this?