Why would you use "str" + x + "str"
in ImageLocation.
private void CreateEnemies()
{
Random rnd = new Random();
int x = rnd.Next(1, kindOfEnemies + 1);
PictureBox enemy = new PictureBox();
int loc = rnd.Next(0, panel1.Height - enemy.Height);
enemy.SizeMode = PictureBoxSizeMode.StretchImage;
enemy.ImageLocation = "Aliens/" + x + ".png";
}
I don't understand why you would use this.