Visual studio question about Data Sources

So I had to get a new hard drive for my laptop and when I installed visual studios 2022 I noticed that Data Sources was missing everything. I took a screen shot to perhaps explain it better to you guys. I've tried looking online how to restore it and can't find how to restore it. Can someone help me?

visual_studio1.PNG

Can someone help me make this work?

My program worked earlier this year before Windows 10 put and update and suddenly it doesn't work anymore. I have a separate laptop that didn't get the update and it works perfectly. Can someone please tell me what I need to do to get it to work? Ive tried everything I could think of and nothing works.

                    string[] music = Directory.GetFiles(@"C:\Users\Robert\Documents\C# stuff\Skynet\Skynet\bin\Debug\Music file", "*.mp3");// this is the original path

                    WMPLib.IWMPPlaylist Classicalplaylist = mplayer.playlistCollection.newPlaylist("classicalplaylist");
                    foreach (string file in music)
                    {
                        WMPLib.IWMPMedia media = mplayer.newMedia(file);
                        Classicalplaylist.appendItem(media);
                    }
                    mplayer.currentPlaylist = Classicalplaylist;

Making levels for game

Working on a game for a friends daughter for her 6th birthday. Its a scrolling game where the player will be Snoopy and they'll be flying around on his doghouse collecting Woodstock (Which are flying around the screen) for each level (There will be 4 levels). At the end of each level, the game will have an intermission and show a 10sec video of Snoopy dancing. The background will play the Peanuts theme song. Ive figured out everything except how to make levels for the game. I've tried using a timer but that didn't seem to work very well. Everytime Ive tried to include the block of code I've written the screen doesn't add it and returns back to step one of asking a question on this forum.

Help with homing missile I have one part working

Making a scrolling space shooting video game in C# where the player will fight one on one with their opponent. I was able to figure out how to make the missile go up if the opponent was above the player. But, I can't seem to make it work if the opponent is below or right infront of the player. Can someone help me? I know the answer is right under my nose.

The function below handles the movement of the missile

 void movemissile()
        {
            foreach (Control y in this.Controls)
            {
                if (y is PictureBox && y.Tag == "missile") 
                {

                    //y.Left += 100;//x.Top -= 10;
                    if (y.Left > enemy.Left)//<100
                    {
                        y.Left += 10;
                        //this.Controls.Remove(y);
                    }

                    //plyer missile goes up if opponent is above
                    if (y.Top > enemy.Top)
                    {
                        y.Left += 10;
                        y.Top -= 20;
                        y.Left += 10;
                        //this.Controls.Remove(y);
                    }
                    y.Left += 100;//x.Top -= 10;
                    if (y.Top > enemy.Left)//<100
                    { 
                        this.Controls.Remove(y);
                    }
                }
            }
        }

        This function handles drawing the missile of the player for the game.
                void Missile()
        {
            PictureBox m = new PictureBox();
            m.SizeMode = PictureBoxSizeMode.AutoSize;
            m.Image = Properties.Resources.Missile1;
            m.BackColor = System.Drawing.Color.Transparent;
            m.Tag = "missile";
            m.Left = Player.Left + 100;//moves bullet left or right
            m.Top = Player.Top + 55;//55 is perfect
            this.Controls.Add(m);
            m.BringToFront();
        }

2D game pause between player shots

I kind of figured out how to put a pause in my 2d game when the player shoots. The problem is that when the player shoots once, the game will continue to shoot continously, even after the player has stopped shooting. Can someone please help me?

        void Bullet()//draws the players ship ammo
        {
            PictureBox bullet = new PictureBox();
            bullet.SizeMode = PictureBoxSizeMode.AutoSize;
            bullet.Image = Properties.Resources.Shoot;
            bullet.BackColor = System.Drawing.Color.Transparent;
            bullet.Tag = "bullet";
            bullet.Left = playersuper.Left + 100;//moves bullet left or right
            bullet.Top = playersuper.Top + 50;//55 is perfect                    
            this.Controls.Add(bullet);
            bullet.BringToFront();
            shootimer.Interval = 1000;
            shootimer.Enabled = true;
        }
         private void shootimer_Tick(object sender, EventArgs e)
        {
            fire = new SoundPlayer("shooting.wav");
            fire.Play();
        }
        private void Form1_KeyDown(object sender, KeyEventArgs e)
        {
            bool playing = false;
            if (e.KeyCode == Keys.Right)
            {
                right = true;
            }
            if (e.KeyCode == Keys.Left)
            {
                left = true;
            }
            if (e.KeyCode == Keys.Up)
            {
                up = true;
            }
            if (e.KeyCode == Keys.Down)
            {
                down = true;
            }
            if (e.KeyCode == Keys.Space)
            {
                Bullet();
            }
            if (e.KeyCode == Keys.A)
            {
                if (nomissiles.Value >= 10)
                {
                    pc.miss--;
                    nomissiles.Value -= 10;
                    A = true;
                    Missile();
                }
            }
            if (e.KeyCode == Keys.Z)
            {
                PictureBox robot = new PictureBox();
                robot.SizeMode = PictureBoxSizeMode.AutoSize;
                robot.Image = Properties.Resources.Bioroidd;
                robot.BackColor = System.Drawing.Color.Transparent;
                ((PictureBox)playersuper).Image = Properties.Resources.Bioroidd;
                transform = new SoundPlayer("transforming.wav");
                transform.Play();
            }
            if (e.KeyCode == Keys.X)
            {
                PictureBox gerwalk = new PictureBox();
                gerwalk.SizeMode = PictureBoxSizeMode.AutoSize;
                gerwalk.Image = Properties.Resources.Gurwalk;
                gerwalk.BackColor = System.Drawing.Color.Transparent;
                ((PictureBox)playersuper).Image = Properties.Resources.Gurwalk;
                transform = new SoundPlayer("transforming.wav");
                transform.Play();
            }
            if (e.KeyCode == Keys.C)
            {
                PictureBox fighter = new PictureBox();
                fighter.SizeMode = PictureBoxSizeMode.StretchImage;
                fighter.Image = Properties.Resources.fighter;
                fighter.BackColor = System.Drawing.Color.Transparent;
                ((PictureBox)playersuper).Image = Properties.Resources.fighter;
                transform = new SoundPlayer("transforming.wav");
                transform.Play();
            }
            if (e.KeyCode == Keys.P)
                GameTimer.Stop();
            if (e.KeyCode == Keys.S)
                GameTimer.Start();
        }

Move image using bitmap

Working on a game and I made a separate class to handle the players enemies (Its a scrolling type 90s game). I know if I use picturebox and put it on form1 I can say for example....
enemy1.Left > 90;
My question is how would I do something like that with bitmap? I figured out how to put the image on form1, but I can't figure out how to make it move.

How to use bitmap

Would someone explain to me how to use bitmap. I have a video game I am working on so I added images using resourcesrx and wanted to use bitmap to display where they will appear on form1. I saved the image as player.

Bounce picturebox up and down

Made progress on my game and now I need to make the second boss bounce up and down. I figured out how to make the boss go down, but once it touches the lower wall, it stops and won't bounce (move up).

        void BossMove()
        {
            if((BOSS.Top + 10) <(this.Height - BOSS.Height))
            {
                BOSS.Top += 10;
            }
            if((BOSS.Height) > 0)
            {
                BOSS.Top -= 10;
            }
        }

How to make a delay in shooting game in C# using visual studio?

Working on a video game using visual studio and I am having trouble with the sound effect when the player shoots their weapon. When the player shoots multiple times, the sound overlaps. Ive tried many things and this was my last attempt. Can someone please help me? I am stuck.

if (e.KeyCode == Keys.Space)
            {
                while(true)
                {
                    bossTimer.Stop();
                    space = true;
                    Bullet();
                    fire = new SoundPlayer("shooting.wav");
                    fire.Play();
                    bossTimer.Start();
                }

Below is my program

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace boss_fight
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }
        bool right, left, up, down, space, A;
        int miss = 10;//number of missiles

        void HitorMiss()
        {
            foreach (Control j in this.Controls)
            {
                foreach (Control i in this.Controls)
                {
                    if (j is PictureBox && j.Tag == "shot" || j is PictureBox && j.Tag == "missile")
                    {
                        if (i is PictureBox && i.Tag == "boss")
                        {
                            if(j.Bounds.IntersectsWith(i.Bounds))
                            {

                                if (enemyhealth.Value == 0)
                                {
                                    PictureBox bullet = new PictureBox();
                                    bullet.SizeMode = PictureBoxSizeMode.AutoSize;
                                    bullet.Image = Properties.Resources.Shoot;
                                    bullet.BackColor = System.Drawing.Color.Transparent;
                                    ((PictureBox)j).Image = Properties.Resources.explosion;
                                }
                                else
                                    enemyhealth.Value -= 10;
                            }
                        } 
                    }
                }
                if (Player.Bounds.IntersectsWith(e1laser.Bounds))//Player loses health when hit by boss laser
                {
                    if (healthbar.Value == 0)
                    {
                        PictureBox bullet = new PictureBox();
                        bullet.SizeMode = PictureBoxSizeMode.AutoSize;
                        bullet.Image = Properties.Resources.Shoot;
                        bullet.BackColor = System.Drawing.Color.Transparent;
                        ((PictureBox)Player).Image = Properties.Resources.explosion;
                    }
                    else
                        healthbar.Value -= 10;
                }
            }
        }
        void Shot()//positions where players laser shows on the screen
        {
            PictureBox ammo = new PictureBox();
            ammo.SizeMode = PictureBoxSizeMode.AutoSize;
            ammo.Image = Properties.Resources.Shoot;
            ammo.BackColor = System.Drawing.Color.Transparent;
            ammo.Tag = "shot";
            ammo.Left = Player.Left + 100;//moves bullet left or right
            ammo.Top = Player.Top + 55;//55 is perfect
            this.Controls.Add(ammo);
            ammo.BringToFront();
        }
        void MoveShot()
        {
            foreach (Control x in this.Controls)
            {
                if (x is PictureBox && x.Tag == "shot")
                {
                    x.Left += 100;//x.Top -= 10;
                    if (x.Top > 900)//<100
                    {
                        this.Controls.Remove(x);
                    }
                }
            }
            shoot.Left -= 30;
            e1laser.Left -= 30;
            if (e1laser.Left < 0)
            {
                e1laser.Left = BOSS.Left;
                e1laser.Top = BOSS.Top + 25;
            }

            zmissile1.Left = zmissile1.Left -= 100;
            zmissile1.Top = zmissile1.Top - 100;
            if(zmissile1.Left < 0)
            {
                zmissile1.Left = BOSS.Left;
                zmissile1.Top = BOSS.Top + 10;//+10
            }
            zmissile2.Left -= 100;
            if(zmissile2.Left < 0)
            {
                zmissile2.Left = BOSS.Left;
                zmissile2.Top = BOSS.Top + 50;//+10
            }
            zmissile3.Left = zmissile3.Left -= 100;
            zmissile3.Top = zmissile3.Top + 100;
            if (zmissile3.Left < 0)
            {
                zmissile3.Left = BOSS.Left;
                zmissile3.Top = BOSS.Top + 70;//+10
            }
        }

        private void Form1_KeyUp(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Right)
            {
                right = false;
            }
            if (e.KeyCode == Keys.Left)
            {
                left = false;
            }
            if (e.KeyCode == Keys.Up)
            {
                up = false;
            }
            if (e.KeyCode == Keys.Down)
            {
                down = false;
            }
            if (e.KeyCode == Keys.Space)
            {
                space = false;
            }
            if (e.KeyCode == Keys.A)
            {
                A = false;
            }
        }
        void Playermovement()
        {
            if (right == true)
            {
                if (Player.Left < 900)
                {
                    Player.Left += 20;
                }
            }
            if (left == true)
            {
                if (Player.Left > 5)
                {
                    Player.Left -= 15;
                }
            }
            if (up == true)
            {
                if (Player.Top > 20)
                {
                    Player.Top -= 20;
                }
            }
            if (down == true)
            {
                if (Player.Top < 550)
                {
                    Player.Top += 20;
                }
            }
        }
        private void Form1_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Right)
            {
                right = true;
            }
            if (e.KeyCode == Keys.Left)
            {
                left = true;
            }
            if (e.KeyCode == Keys.Up)
            {
                up = true;
            }
            if (e.KeyCode == Keys.Down)
            {
                down = true;
            }
            if (e.KeyCode == Keys.Space)
            {
                space = true;
                Shot();
            }

        }

        private void timer1_Tick(object sender, EventArgs e)
        {
            Playermovement();
            MoveShot();
            HitorMiss();

        }
    }
}

Create labels dynamically, display them on form1 and then have them move

Tryng to work on a program to make a menu on form1. What it will do is display the different things offered at the restaurant and the text will scrolll from the bottom of the screen to the top and then repeat.

I was able to figure out how to make labels dynamically but I can't figure out how to display them on form1.

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace cafeteka_mod1
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }
        int fav = 9;

        void allamerican()
        {
            Label[] labels = new Label[fav];

            for(int i = 0; i < fav; i++)
            {
                labels[i] = new Label();
            }
            for(int a = 0; a < fav; a++)
            {
                this.Controls.Add(labels[a]);
            }
            string[] one = { "ALL AMERICAN FAVOURITES","Cafe Americano... $35",
            "Capuccino... $40",
            "Cafe Latta... $40",
            "Macchiato... $50",
            "Mocha... $40",
            "Mocha Blanco... $50",
            "Espresso... $30",
            "Mocha Organico... $60",
            "Cold Brew... $50"};

            for(int y = 0; y < fav; y++)
            {
                labels.Text = one.ToString();
            }
        }

        private void timer1_Tick(object sender, EventArgs e)
        {

        }
    }
}

C# scrolling game help

Learning C# and I am working on a C# scrolling shooting game. The game works so far but when the player finishes a level, I want the enemies to appear on the far right of the screen and the player on the left of the screen. When the level is finished neither the enemies or the player appear. Can someone please help me?

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Media;
using WMPLib;
namespace Macross_mod_8
{
    public partial class Game : Form
    {
        WindowsMediaPlayer win = new WindowsMediaPlayer();
        WindowsMediaPlayer Roy = new WindowsMediaPlayer();
        WindowsMediaPlayer Rick = new WindowsMediaPlayer();
        WindowsMediaPlayer squad = new WindowsMediaPlayer();
        WindowsMediaPlayer alien = new WindowsMediaPlayer();
        WindowsMediaPlayer fly = new WindowsMediaPlayer();
        playerclass pc = new playerclass();
        LevelClass lc = new LevelClass();
        private SoundPlayer pl = new SoundPlayer();
        private SoundPlayer fire;
        private SoundPlayer transform;
        private SoundPlayer victory;
        //private SoundPlayer dead;
        private SoundPlayer theme = new SoundPlayer();
        int num = 0;//used to count images for imagelist
        int no = 0;//used to count images for imagelist
        bool right, left, up, down, space, Z, X, C, A;
        int score;//this will run as long as the player has lives and doesn't die
        int fscore;
        int kills;//how many enemies player killed in the game
        int miss = 10;// number of missiles player has
        int m = 0;//Counts how many missiles have been used by the player
        int i = 0;//used for healing square
        int xp = 0;//number used to count for explosions
        private int _ticks;// You use a private variable when you want to do some sort of validation 
        //before setting the property, or basically abstract away what is happening inside your 
        //class with regards to that property

        private int nlevel;//This wil show what level the player is on
        private int endlevel;//this will count off the time from victory song and the player sprite reaches far right wall

        Random rnd = new Random();
        private int objwidth;
        private const int objheight = 50;
        private int objx, objy;//position
        private int volx, voly;//velocity
        public Game()
        {
            InitializeComponent();
            armouredPlayer.Visible = false;
            playersuper.Visible = false;
            walking.Visible = true;
            shooting.Visible = true;
            //this.theme.SoundLocation = @"C:\Users\abgarza003\Documents\C# stuff\Macross mod 8\Macross mod 8\bin\Debug\Robotech Theme.wav";
            this.theme.PlayLooping();
            lblchoose.Visible = true;
            lblready.Visible = false;
            lblgo.Visible = false;
            lblgameover.Visible = false;
            lblyoukilled.Visible = false;
            lblkilled.Visible = false;
            lblenemies.Visible = false;
            lblready.Visible = false;
            lblgo.Visible = false;
            lblfinalpoints.Visible = false;
            //lblfinalscore.Visible = false;
            lblscoreforlevel.Visible = false;
            enemyhealth.Visible = false;
            lblbosshealth.Visible = false;
            GameTimer.Stop();
            kills++;
            mplayer.Visible = false;
            e9laser.Visible = false;
            powerarmour.Visible = false;
            zmissile1.Visible = false;
            zmissile2.Visible = false;
            zmissile3.Visible = false;
            lblscore.Visible = true;
            officers.Visible = false;
            level1.Visible = true;
            level2.Visible = false;
            level3.Visible = false;
        }
        void GameScore()
        {
            score++;
            lblscore.Text = "" + score;
        }
        void AutoMovePlayer()
        {
            //This will move the player across the screen after the boss is beaten
            //lblscore = lblfinalscore;
            endlevel++;
            GameTimer.Enabled = true;
            enemyhealth.Visible = false;
            lblbosshealth.Visible = false;
            playersuper.Left = playersuper.Left + 20;
            if (playersuper.Left >= 1400)
            {
                enemyhealth.Visible = false;
                lblbosshealth.Visible = false;
                lblfinalpoints.Visible = true;
                GameTimer.Enabled = false;
                lblscoreforlevel.Visible = true;
                lblfinalpoints.Text = "" + score;//displays current score
            }
            armouredPlayer.Left = armouredPlayer.Left + 20;
            if(armouredPlayer.Left > 1400)
            {
                enemyhealth.Visible = false;
                lblbosshealth.Visible = false;
                lblfinalpoints.Visible = true;
                GameTimer.Enabled = false;
                lblscoreforlevel.Visible = true;
                lblfinalpoints.Text = "" + score;//displays current score
            }
            /*
            if(endlevel > 250 && armouredPlayer.Visible || endlevel > 250 && playersuper.Visible)
            {
                mplayer.close();
                //NextLevel();//
            }
            */
        }
        private void finaletimer_Tick(object sender, EventArgs e)
        {
            if (enemyhealth.Value <= 0)
            {
                bouncingtimer.Stop();
                lblkilled.Text = "" + kills;//shows how many enemies player killed
                AutoMovePlayer();
            }
        }
        void GameLevel()
        {
            if (lc.nlevel > 0)
                lc.nlevel -= 1;
            if(lc.nlevel == 2)
            {
                level1.Visible = true;
                level2.Visible = true;
                level3.Visible = false;
            }
            if(lc.nlevel == 1)
            {
                level1.Visible = true;
                level2.Visible = true;
                level3.Visible = true;

            }
        }
        void Lives()
        {
            if (pc.Plives > 0)
                pc.Plives -= 1;
            if (pc.Plives == 3)
            {
                life1.Visible = true;
                life2.Visible = true;
                life3.Visible = true;            }
            else if (pc.Plives == 2)
            {
                life1.Visible = false;
                life2.Visible = true;
                life3.Visible = true;
                ResetGameAfterDeath();
                //RandomQuotes();
            }
            else if (pc.Plives == 1)
            {
                life1.Visible = false;
                life2.Visible = false;
                life3.Visible = true;
                ResetGameAfterDeath();
                //RandomQuotes();
            }
            else if (pc.Plives == 0)
            {
                life1.Visible = false;
                life2.Visible = false;
                life3.Visible = false;
                mplayer.close();
            }
        }
        private void timer1_Tick(object sender, EventArgs e)
        {
            lblready.Visible = false;
            lblgo.Visible = false;
            timer1.Enabled = false;
        }
        void NextLevel()
        //When player dies enemies reset to x1300 and will randomlly be placed between y30 to y560
        {
            //GameTimer.Start();
            //GameTimer.Enabled = true;
            int a, b, c, d, e, f, g, h;
            //armouredPlayer.Location = new Point(0, 250); //(-100, -300);
            //playersuper.Location = new Point(0, 250);
            a = rnd.Next(30, 560);
            b = rnd.Next(30, 560);
            c = rnd.Next(30, 560);
            d = rnd.Next(30, 560);
            e = rnd.Next(30, 560);
            f = rnd.Next(30, 560);
            g = rnd.Next(30, 560);
            h = rnd.Next(30, 560);
            e1.Location = new Point(1300, a);
            e2.Location = new Point(1300, b);
            e3.Location = new Point(1300, c);
            e4.Location = new Point(1300, d);
            e5.Location = new Point(1300, e);
            e6.Location = new Point(1300, f);
            e7.Location = new Point(1300, g);
            e8.Location = new Point(1300, h);
            lblready.Visible = false;
            lblgo.Visible = false;
        }
        void ResetGameAfterDeath()
        //When player dies enemies reset to x1300 and will randomlly be placed between y30 to y560
        {
            int a, b, c, d, e, f, g, h;
            armouredPlayer.Location = new Point(0, 250); //(-100, -300);
            playersuper.Location = new Point(0, 250);
            a = rnd.Next(30, 560);
            b = rnd.Next(30, 560);
            c = rnd.Next(30, 560);
            d = rnd.Next(30, 560);
            e = rnd.Next(30, 560);
            f = rnd.Next(30, 560);
            g = rnd.Next(30, 560);
            h = rnd.Next(30, 560);
            e1.Location = new Point(1300, a);
            e2.Location = new Point(1300, b);
            e3.Location = new Point(1300, c);
            e4.Location = new Point(1300, d);
            e5.Location = new Point(1300, e);
            e6.Location = new Point(1300, f);
            e7.Location = new Point(1300, g);
            e8.Location = new Point(1300, h);
            lblready.Visible = true;
            lblgo.Visible = true;
            //mad.Visible = true;
            //RandomQuotes();
            timer1.Interval = 1000;
            timer1.Enabled = true;
        }
        void HitorMiss()
        //function handles collision with enemies, player shooting and hitting enemies
        //enemies hitting player, player touches heal symbol and player death
        {
            foreach (Control j in this.Controls)
            {
                if (j is PictureBox && (j.Tag == "bullet" || j.Tag == "missile"))
                {
                    foreach (Control i in Controls)
                    {
                        if (i is PictureBox && i.Tag == "boss")
                        {
                            if (j.Bounds.IntersectsWith(i.Bounds))
                            {
                                if (enemyhealth.Value <= 0)
                                {
                                    i.Top = -750;
                                    mplayer.close();
                                    PictureBox shoot = new PictureBox();
                                    shoot.SizeMode = PictureBoxSizeMode.AutoSize;
                                    shoot.Image = Properties.Resources.Shoot;
                                    shoot.BackColor = System.Drawing.Color.Transparent;
                                    ((PictureBox)j).Image = Properties.Resources.explosion;
                                    nomissiles.Value = 100;
                                    healthbar.Value = 100;
                                    nomissiles.Value = 100;
                                    healthbar.Value = 100;
                                    playersuper.Location = new Point(0, 250);
                                    PictureBox fighter = new PictureBox();
                                    fighter.SizeMode = PictureBoxSizeMode.StretchImage;
                                    fighter.Image = Properties.Resources.fighter;
                                    fighter.BackColor = System.Drawing.Color.Transparent;
                                    ((PictureBox)playersuper).Image = Properties.Resources.fighter;
                                    transform = new SoundPlayer("transforming.wav");
                                    transform.Play();
                                    nmissiles.Visible = false;
                                    healthup.Visible = false;
                                    enemyhealth.Visible = false;
                                    lblbosshealth.Visible = false;
                                    victory = new SoundPlayer("victory.wav");
                                    victory.Play();
                                    fly.URL = "gundam_soaring_by.mp3";
                                    fly.controls.play();
                                    nomissiles.Value = 100;
                                    healthbar.Value = 100;
                                    nomissiles.Value = 100;
                                    healthbar.Value = 100;
                                    GameScore();
                                    GameLevel();
                                    powerarmour.Visible = false;
                                    e9laser.Visible = false;
                                    powerarmour.Location = new Point(-250, -50);//
                                    e9laser.Location = new Point(-150, 50);  //(1250,50);
                                    boom.Visible = false;
                                    boom1.Visible = false;
                                    boom2.Visible = false;
                                    boom3.Visible = false;
                                    boom4.Visible = false;
                                    boom5.Visible = false;
                                    lblyoukilled.Visible = true;
                                    lblkilled.Visible = true;
                                    lblenemies.Visible = true; 
                                }
                                else
                                    enemyhealth.Value -= 5;
                            }
                        }
                        //if (i is PictureBox && i.Tag == "enemies")
                        if (i is PictureBox && (i.Tag == "enemies" || i.Tag == "zmissile"))
                        {
                            if (j.Bounds.IntersectsWith(i.Bounds))
                            {
                                i.Top = -750;//100;
                                PictureBox bullet = new PictureBox();
                                bullet.SizeMode = PictureBoxSizeMode.AutoSize;
                                bullet.Image = Properties.Resources.Shoot;
                                bullet.BackColor = System.Drawing.Color.Transparent;
                                ((PictureBox)j).Image = Properties.Resources.explosion;
                                kills++;
                                e8laser.Location = new Point(-150, 50);  //(1250,50);
                                //score++;//each time an enemy dies score goes up one point
                                //lblscore.Text = "" + score;//displays current score    
                            }
                        }
                    }
                }
            }
            if (armouredPlayer.Bounds.IntersectsWith(healthup.Bounds))//heals player
            {
                healthbar.Value = 100;
            }
            if (armouredPlayer.Bounds.IntersectsWith(nmissiles.Bounds))//refills players missiles
            {
                nomissiles.ForeColor = Color.Red;
                nomissiles.Value = 100;
            }
            _ticks++;
            /*
            if(_ticks > 300)//2180
            {
                mplayer.URL = "Rick Hunter Theme.mp3";
            }
            */
            if (_ticks > 100)//2180 which is the length of we will win
            {
                //this function controls boss movement
                //BossMove();
                enemyhealth.Visible = true;
                powerarmour.Visible = true;
                lblbosshealth.Visible = true;
                e9laser.Visible = true;
                zmissile1.Visible = true;
                zmissile2.Visible = true;
                zmissile3.Visible = true;
                e1.Location = new Point(-150, 50);  //(1250,50);
                e2.Location = new Point(-150, 75);// (1250,75);
                e3.Location = new Point(-150, 180);// (1250, 100);
                e4.Location = new Point(-150, 125);// (1250,125);
                e5.Location = new Point(-150, 135);// (1250,135);
                e6.Location = new Point(-150, 140);// (1250,140);
                e7.Location = new Point(-150, 145);// (1250,145);
                e8.Location = new Point(-150, 150);
                e1laser.Visible = false;
                e2laser.Visible = false;
                e3laser.Visible = false;
                e4laser.Visible = false;
                e5laser.Visible = false;
                e6laser.Visible = false;
                e7laser.Visible = false;
                e8laser.Visible = false;
                if (playersuper.Bounds.IntersectsWith(powerarmour.Bounds) || playersuper.Bounds.IntersectsWith(e9laser.Bounds) || playersuper.Bounds.IntersectsWith(zmissile1.Bounds) || playersuper.Bounds.IntersectsWith(zmissile2.Bounds) || playersuper.Bounds.IntersectsWith(zmissile3.Bounds))
                {
                    //Player loses health when hit by boss laser or touches powerarmour body
                    if (healthbar.Value <= 0)
                    {
                        Lives();
                        healthbar.Value = 100;
                    }
                    if (pc.Plives == 0)
                    {
                        Lives();
                        GameTimer.Stop();
                        /////////////////////player.close();
                        lblgameover.Visible = true;
                        lblgameover.Text = "GAME OVER";
                        PictureBox bullet = new PictureBox();
                        bullet.SizeMode = PictureBoxSizeMode.AutoSize;
                        bullet.Image = Properties.Resources.Shoot;
                        bullet.BackColor = System.Drawing.Color.Transparent;
                        ((PictureBox)playersuper).Image = Properties.Resources.explosion;

                        //dead = new SoundPlayer("death.wav");
                        //RandomQuotes();
                        //dead.Play();
                        this.pl.SoundLocation = @"C:\Users\abgarza003\Documents\C# stuff\Macross mod 6\Macross mod 6\bin\Debug\Dead.wav";
                        this.pl.PlayLooping();
                    }
                    else
                    {
                        healthbar.Value -= 10;
                    }
                }
            }
            if (playersuper.Bounds.IntersectsWith(e1.Bounds) || playersuper.Bounds.IntersectsWith(e1laser.Bounds) || playersuper.Bounds.IntersectsWith(e2.Bounds) || playersuper.Bounds.IntersectsWith(e2laser.Bounds) || playersuper.Bounds.IntersectsWith(e3.Bounds) || playersuper.Bounds.IntersectsWith(e3laser.Bounds) || playersuper.Bounds.IntersectsWith(e4.Bounds) || playersuper.Bounds.IntersectsWith(e4laser.Bounds) || playersuper.Bounds.IntersectsWith(e5.Bounds) || armouredPlayer.Bounds.IntersectsWith(e5laser.Bounds) || playersuper.Bounds.IntersectsWith(e6.Bounds) || playersuper.Bounds.IntersectsWith(e6laser.Bounds) || playersuper.Bounds.IntersectsWith(e7.Bounds) || playersuper.Bounds.IntersectsWith(e7laser.Bounds) || playersuper.Bounds.IntersectsWith(e8.Bounds) || playersuper.Bounds.IntersectsWith(e8laser.Bounds))
            {
                if (healthbar.Value <= 0)
                {
                    Lives();
                    healthbar.Value = 100;
                }
                if (pc.Plives == 0)
                {
                    Lives();
                    GameTimer.Stop();
                    //bouncingtimer.Stop();
                    /////////////////////player.close();
                    lblgameover.Visible = true;
                    lblgameover.Text = "GAME OVER";
                    PictureBox bullet = new PictureBox();
                    bullet.SizeMode = PictureBoxSizeMode.AutoSize;
                    bullet.Image = Properties.Resources.Shoot;
                    bullet.BackColor = System.Drawing.Color.Transparent;
                    ((PictureBox)playersuper).Image = Properties.Resources.explosion;
                    //dead = new SoundPlayer("death.wav");
                    //RandomQuotes();
                    //dead.Play();
                    this.pl.SoundLocation = @"C:\Users\abgarza003\Documents\C# stuff\Macross mod 6\Macross mod 6\bin\Debug\Dead.wav";
                    this.pl.PlayLooping();
                }
                else
                    healthbar.Value -= 10;
            }
            if (armouredPlayer.Bounds.IntersectsWith(e1.Bounds) || armouredPlayer.Bounds.IntersectsWith(e1laser.Bounds) || armouredPlayer.Bounds.IntersectsWith(e2.Bounds) || armouredPlayer.Bounds.IntersectsWith(e2laser.Bounds) || armouredPlayer.Bounds.IntersectsWith(e3.Bounds) || armouredPlayer.Bounds.IntersectsWith(e3laser.Bounds) || armouredPlayer.Bounds.IntersectsWith(e4.Bounds) || armouredPlayer.Bounds.IntersectsWith(e4laser.Bounds) || armouredPlayer.Bounds.IntersectsWith(e5.Bounds) || armouredPlayer.Bounds.IntersectsWith(e5laser.Bounds) || armouredPlayer.Bounds.IntersectsWith(e6.Bounds) || armouredPlayer.Bounds.IntersectsWith(e6laser.Bounds) || armouredPlayer.Bounds.IntersectsWith(e7.Bounds) || armouredPlayer.Bounds.IntersectsWith(e7laser.Bounds) || armouredPlayer.Bounds.IntersectsWith(e8.Bounds) || armouredPlayer.Bounds.IntersectsWith(e8laser.Bounds))
            {
                if (healthbar.Value <= 0)
                {
                    Lives();
                    healthbar.Value = 100;
                }
                if (pc.Plives == 0)
                {
                    Lives();
                    GameTimer.Stop();
                    //bouncingtimer.Stop();
                    /////////////////////player.close();
                    lblgameover.Visible = true;
                    lblgameover.Text = "GAME OVER";
                    PictureBox bullet = new PictureBox();
                    bullet.SizeMode = PictureBoxSizeMode.AutoSize;
                    bullet.Image = Properties.Resources.Shoot;
                    bullet.BackColor = System.Drawing.Color.Transparent;
                    ((PictureBox)armouredPlayer).Image = Properties.Resources.explosion;
                    //dead = new SoundPlayer("death.wav");
                    //RandomQuotes();
                    //dead.Play();
                    this.pl.SoundLocation = @"C:\Users\abgarza003\Documents\C# stuff\Macross mod 6\Macross mod 6\bin\Debug\Dead.wav";
                    this.pl.PlayLooping();
                }
                else
                    healthbar.Value -= 10;
            }
        }
        void Explosion()
        {
            Random rnd = new Random();
            int a = rnd.Next(0, 1200);//690
            int b = rnd.Next(0, 650);//600
            int c = rnd.Next(0, 1200);//690
            int d = rnd.Next(0, 650);//600
            int e = rnd.Next(0, 1200);//690
            int f = rnd.Next(0, 650);//600
            int g = rnd.Next(0, 1200);//690
            int h = rnd.Next(0, 650);//600
            int i = rnd.Next(0, 1200);//690
            int j = rnd.Next(0, 650);//600
            int k = rnd.Next(0, 1200);//690
            int l = rnd.Next(0, 650);//600
            boom.Image = imageList3.Images[xp];
            boom.Location = new Point(a, b);
            if (xp == imageList3.Images.Count - 1)
            {
                xp = 0;
            }
            else
            {
                xp++;
            }
            boom1.Image = imageList3.Images[xp];
            boom1.Location = new Point(c, d);
            if (xp == imageList3.Images.Count - 1)
            {
                xp = 0;
            }
            else
            {
                xp++;
            }
            boom2.Image = imageList3.Images[xp];
            boom2.Location = new Point(e, f);
            if (xp == imageList3.Images.Count - 1)
            {
                xp = 0;
            }
            else
            {
                xp++;
            }
            boom3.Image = imageList3.Images[xp];
            boom3.Location = new Point(g, h);
            if (xp == imageList3.Images.Count - 1)
            {
                xp = 0;
            }
            else
            {
                xp++;
            }
            boom4.Image = imageList3.Images[xp];
            boom4.Location = new Point(i, j);
            if (xp == imageList3.Images.Count - 1)
            {
                xp = 0;
            }
            else
            {
                xp++;
            }
            boom5.Image = imageList3.Images[xp];
            boom5.Location = new Point(k, l);
            if (xp == imageList3.Images.Count - 1)
            {
                xp = 0;
            }
            else
            {
                xp++;
            }
        }
        private void Game_KeyDown(object sender, KeyEventArgs e)
        {
            if (enemyhealth.Value == 0)
            {
                if (e.KeyCode == Keys.Right)
                {
                    right = false;
                }
                if (e.KeyCode == Keys.Left)
                {
                    left = false;
                }
                if (e.KeyCode == Keys.Up)
                {
                    up = false;
                }
                if (e.KeyCode == Keys.Down)
                {
                    down = false;
                }
                if (e.KeyCode == Keys.Space)
                {
                    space = false;
                    //Bullet();
                    //fire = new SoundPlayer("shooting.wav");
                    //fire.Play();
                }
                if (e.KeyCode == Keys.A)
                {
                    A = false;
                    //Missile();
                    if (nomissiles.Value >= 10)
                    {
                        /*
                        miss--;
                        nomissiles.Value -= 10;
                        A = false;
                        Missile();
                        */
                    }
                }
                if (e.KeyCode == Keys.P)
                    GameTimer.Stop();
                if (e.KeyCode == Keys.S)
                    GameTimer.Start();
            }
            else
            {
                if (e.KeyCode == Keys.Right)
                {
                    right = true;
                }
                if (e.KeyCode == Keys.Left)
                {
                    left = true;
                }
                if (e.KeyCode == Keys.Up)
                {
                    up = true;
                }
                if (e.KeyCode == Keys.Down)
                {
                    down = true;
                }
                if (e.KeyCode == Keys.Space)
                {
                    space = true;
                    Bullet();
                    fire = new SoundPlayer("shooting.wav");
                    fire.Play();
                }
                if (e.KeyCode == Keys.A)
                {
                    if (nomissiles.Value >= 10)
                    {
                        miss--;
                        nomissiles.Value -= 10;
                        A = true;
                        Missile();
                    }
                }
                if (e.KeyCode == Keys.Z)
                {
                    PictureBox robot = new PictureBox();
                    robot.SizeMode = PictureBoxSizeMode.AutoSize;
                    robot.Image = Properties.Resources.Bioroidd;
                    robot.BackColor = System.Drawing.Color.Transparent;
                    ((PictureBox)playersuper).Image = Properties.Resources.Bioroidd;
                    transform = new SoundPlayer("transforming.wav");
                    transform.Play();
                }
                if (e.KeyCode == Keys.X)
                {
                    PictureBox gerwalk = new PictureBox();
                    gerwalk.SizeMode = PictureBoxSizeMode.AutoSize;
                    gerwalk.Image = Properties.Resources.Gurwalk;
                    gerwalk.BackColor = System.Drawing.Color.Transparent;
                    ((PictureBox)playersuper).Image = Properties.Resources.Gurwalk;
                    transform = new SoundPlayer("transforming.wav");
                    transform.Play();
                }
                if (e.KeyCode == Keys.C)
                {
                    PictureBox fighter = new PictureBox();
                    fighter.SizeMode = PictureBoxSizeMode.StretchImage;
                    fighter.Image = Properties.Resources.fighter;
                    fighter.BackColor = System.Drawing.Color.Transparent;
                    ((PictureBox)playersuper).Image = Properties.Resources.fighter;
                    transform = new SoundPlayer("transforming.wav");
                    transform.Play();
                }
                if (e.KeyCode == Keys.P)
                    GameTimer.Stop();
                if (e.KeyCode == Keys.S)
                    GameTimer.Start();
            }
        }
        void Enemies_move()
        {
            int a, b, c, d, e, f, g, h;
            Random rnd = new Random();
            e1.Left -= 15;// 10;//1053
            if (e1.Left < 0)
            {
                a = rnd.Next(30, 560);
                e1.Location = new Point(1300, a);
            }
            e2.Left -= 15;// 10;
            if (e2.Left < 0)
            {

                b = rnd.Next(30, 560);
                e2.Location = new Point(1300, b);
            }
            e3.Left -= 15;// 10;
            if (e3.Left < 0)//if (e3.Left < 0)
            {
                c = rnd.Next(30, 560);
                e3.Location = new Point(1300, c);
            }
            e4.Left -= 15;// 10;
            if (e4.Left < 0)
            {
                d = rnd.Next(30, 560);
                e4.Location = new Point(1300, d);
            }
            e5.Left -= 15;// 10;
            if (e5.Left < 0)
            {
                e = rnd.Next(30, 560);
                e5.Location = new Point(1300, e);
            }
            e6.Left -= 15;
            if (e6.Left < 0)
            {
                f = rnd.Next(30, 560);
                e6.Location = new Point(1300, f);
            }
            e7.Left -= 15;
            if (e7.Left < 0)
            {
                g = rnd.Next(30, 560);
                e7.Location = new Point(3200, g);
            }
            e8.Left -= 15;
            if (e8.Left < 0)
            {
                h = rnd.Next(30, 560);
                e8.Location = new Point(3200, h);
            }
        }
        void Bullet()//draws super veretech players ammo
        {
            PictureBox bullet = new PictureBox();
            bullet.SizeMode = PictureBoxSizeMode.AutoSize;
            bullet.Image = Properties.Resources.Shoot;
            bullet.BackColor = System.Drawing.Color.Transparent;
            bullet.Tag = "bullet";
            bullet.Left = playersuper.Left + 100;//moves bullet left or right
            bullet.Top = playersuper.Top + 50;//55 is perfect                    
            this.Controls.Add(bullet);
            bullet.BringToFront();
        }
        void movebullet()
        {
            foreach (Control x in this.Controls)
            {
                if (x is PictureBox && x.Tag == "bullet")
                {
                    x.Left += 100;//x.Top -= 10;
                    if (x.Top > 900)//<100
                    {
                        this.Controls.Remove(x);
                    }
                }
            }
        }
        void EnemymoveBullet()
        {//This handles the enemies shooting at player
            e1laser.Left -= 100;
            if (e1laser.Left < 0)
            {
                e1laser.Left = e1.Left;
                e1laser.Top = e1.Top + 25;
            }
            e2laser.Left -= 100;
            if (e2laser.Left < 0)
            {
                e2laser.Left = e2.Left;
                e2laser.Top = e2.Top + 25;
            }
            e3laser.Left -= 100;
            if (e3laser.Left < 0)
            {
                e3laser.Left = e3.Left;
                e3laser.Top = e3.Top + 25;
            }
            e4laser.Left -= 100;
            if (e4laser.Left < 0)
            {
                e4laser.Left = e4.Left;
                e4laser.Top = e4.Top + 25;
            }
            e5laser.Left -= 100;
            if (e5laser.Left < 0)
            {
                e5laser.Left = e5.Left;
                e5laser.Top = e5.Top + 25;
            }
            e6laser.Left -= 100;
            if (e6laser.Left < 0)
            {
                e6laser.Left = e6.Left;
                e6laser.Top = e6.Top + 25;
            }
            e7laser.Left -= 100;
            if (e7laser.Left < 0)
            {
                e7laser.Left = e7.Left;
                e7laser.Top = e7.Top + 25;
            }
            e8laser.Left -= 100;//30
            if (e8laser.Left < 0)
            {
                e8laser.Left = e8.Left;
                e8laser.Top = e8.Top + 25;//25 moves laser up and down y axis
            }
            e9laser.Left -= 100;
            if (e9laser.Left < 0)
            {
                e9laser.Left = powerarmour.Left;
                e9laser.Top = powerarmour.Top + 60;
            }
            zmissile1.Left = zmissile1.Left -= 40;
            zmissile1.Top = zmissile1.Top - 40;
            if (zmissile1.Left < 0)
            {
                zmissile1.Left = powerarmour.Left;
                zmissile1.Top = powerarmour.Top + 10;//+10
            }
            zmissile2.Left -= 40;
            if (zmissile2.Left < 0)
            {
                zmissile2.Left = powerarmour.Left;
                zmissile2.Top = powerarmour.Top + 50;//+10
            }
            zmissile3.Left = zmissile3.Left -= 40;
            zmissile3.Top = zmissile3.Top + 40;
            if (zmissile3.Left < 0)
            {
                zmissile3.Left = powerarmour.Left;
                zmissile3.Top = powerarmour.Top + 70;//+10
            }
        }
        void ArmouredMovement()
        {
            if (right == true)
            {
                if (armouredPlayer.Left < 900)
                {
                    armouredPlayer.Left += 20;
                }
            }
            if (left == true)
            {
                if (armouredPlayer.Left > 5)
                {
                    armouredPlayer.Left -= 15;
                }
            }
            if (up == true)
            {
                if (armouredPlayer.Top > 20)
                {
                    armouredPlayer.Top -= 20;
                }
            }
            if (down == true)
            {//put picture boundaries here
                if (armouredPlayer.Top < 600)
                {
                    armouredPlayer.Top += 20;
                }
            }
        }
        void SuperMovement()
        {
            if (right == true)
            {
                if (playersuper.Left < 900)
                {
                    playersuper.Left += 20;
                }
            }
            if (left == true)
            {
                if (playersuper.Left > 5)
                {
                    playersuper.Left -= 15;
                }
            }
            if (up == true)
            {
                if (playersuper.Top > 20)
                {
                    playersuper.Top -= 20;
                }
            }
            if (down == true)
            {//put picture boundaries here
                if (playersuper.Top < 650)
                {
                    playersuper.Top += 20;
                }
            }
        }
        private void Game_KeyUp(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Right)
            {
                right = false;
            }
            if (e.KeyCode == Keys.Left)
            {
                left = false;
            }
            if (e.KeyCode == Keys.Up)
            {
                up = false;
            }
            if (e.KeyCode == Keys.Down)
            {
                down = false;
            }
            if (e.KeyCode == Keys.Space)
            {
                space = false;
            }
            if (e.KeyCode == Keys.A)
            {
                A = false;
            }
        }
        void BossMove()
        {
            //Bounces first boss up and down on screen   
            powerarmour.Left = objx;
            powerarmour.Top = objy;

            objx += volx;
            if (objx < 10)
            {
                volx = -volx;
            }
            else if (objx + objwidth > ClientSize.Width)
            {
                volx = -volx;
            }
            objy += voly;
            if (objy < 10)
            {
                voly = -voly;
            }
            else if (objy + objheight > ClientSize.Height)
            {
                voly = -voly;
            }
            Refresh();
        }
        private void bouncingtimer_Tick(object sender, EventArgs e)
        {
            BossMove();
        }



        void movemissile()//moves missile on screen
        {
            foreach (Control y in this.Controls)
            {
                if (y is PictureBox && y.Tag == "missile")
                {
                    y.Left += 100;//x.Top -= 10;
                    if (y.Top > 900)//<100
                    {
                        this.Controls.Remove(y);
                    }
                }
            }
        }
        private void Game_Load(object sender, EventArgs e)
        {
            //ModifyProgressBarColor.SetState(BHEALTH, progressBarRed);
            //textBox1.Visible = false;
            //mad.Visible = false;
            //
            Random rand = new Random();
            volx = rand.Next(1, 4);//1,4
            voly = rand.Next(1, 8);//1,4
            objx = powerarmour.Left;
            objy = powerarmour.Top;
            objwidth = powerarmour.Width;

            objx = rand.Next(0, ClientSize.Width - objwidth);
            objy = rand.Next(0, ClientSize.Height - objheight);
            this.SetStyle(
                ControlStyles.AllPaintingInWmPaint |
                //ControlStyles.UserPaint,
                ControlStyles.OptimizedDoubleBuffer, true);
            this.UpdateStyles();
        }
        void Missile()
        {
            //positions missile for player
            PictureBox m = new PictureBox();
            m.SizeMode = PictureBoxSizeMode.AutoSize;
            m.Image = Properties.Resources.Missile1;
            m.BackColor = System.Drawing.Color.Transparent;
            m.Tag = "missile";
            m.Left = playersuper.Left + 100;//moves bullet left or right
            m.Top = playersuper.Top + 10;//55 is perfect
            this.Controls.Add(m);
            m.BringToFront();
        }
        void AddMissiles()//frequency of rearmed missiles appear on screen
        {//makes missile icon appear and scroll across the screen
            Random addmiss = new Random();
            m++;
            int mi;

            nmissiles.Left -= 10;
            if (m == 100)
            {
                nmissiles.Visible = true;
                mi = addmiss.Next(50, 550);
                nmissiles.Location = new Point(1200, mi);
            }
            else if (m == 500)
                m = 0;

            foreach (Control m in this.Controls)
            {
                if (m is PictureBox && m.Tag == "MISSILES")
                {
                    if (armouredPlayer.Bounds.IntersectsWith(nmissiles.Bounds) || playersuper.Bounds.IntersectsWith(nmissiles.Bounds))
                    {
                        nmissiles.Visible = false;//this.Controls.Remove(m);
                    }
                }
            }
        }
        void Health()//Handles icon to heal player. Randomly appears in different places on screen
        {
            Random hpup = new Random();
            i++;
            int hp;
            foreach (Control h in this.Controls)
            {
                if (h is PictureBox && h.Tag == "HEAL")
                {
                    healthup.Left -= 10;
                    if (armouredPlayer.Bounds.IntersectsWith(healthup.Bounds) || (playersuper.Bounds.IntersectsWith(healthup.Bounds)))
                    {
                        healthup.Visible = false;
                    }
                    if (i == 100 && healthup.Left < 0)// i == 100
                    {
                        healthup.Visible = true;
                        hp = hpup.Next(50, 500);
                        healthup.Location = new Point(1200, hp);
                    }
                    if (i == 500)
                    {
                        i = 0;
                    }
                }
            }
        }
        void Start()
        {
            walking.Image = imageList1.Images[num];
            if (num == imageList1.Images.Count - 1)
            {
                num = 0;
            }
            else
                num++;

            shooting.Image = imageList2.Images[no];
            if (no == imageList2.Images.Count - 1)
            {
                no = 0;
            }
            else
                no++;
        }
        private void Armoured_Click(object sender, EventArgs e)
        {
            lblchoose.Visible = false;
            armouredPlayer.Visible = true;
            playersuper.Visible = false;
            Armoured.Visible = false;
            Super.Visible = false;
            walking.Visible = false;
            shooting.Visible = false;
            this.theme.Stop();
            //lbltitle.Visible = false;
            GameTimer.Start();
        }
        private void Super_Click(object sender, EventArgs e)
        {
            lblchoose.Visible = false;
            armouredPlayer.Visible = false;
            playersuper.Visible = true;
            Super.Visible = false;
            Armoured.Visible = false;
            walking.Visible = false;
            shooting.Visible = false;
            this.theme.Stop();
            //lbltitle.Visible = false;
            GameTimer.Start();
        }
        private void imagelisttimer_Tick(object sender, EventArgs e)
        {
            Start();
        }
        private void GameTimer_Tick(object sender, EventArgs e)
        {
            SuperMovement();
            ArmouredMovement();
            movebullet();
            movemissile();
            Health();
            AddMissiles();
            Enemies_move();
            Explosion();
            HitorMiss();
            EnemymoveBullet();
            GameScore();

        }
    }
}

Boss battle for C# game

I am learning to code and I have been working on a game using what I have learned to make it. So I have been making my version of R type C# game and got everything working so far but I run out of ideas how to make this part of the game work.

I wanted to make the boss appear after 5 min of game play and have the smaller opponents disappear. The boss was going to bounce around the screen like a Windows screen saver till the player destroys it (I know how to do that part since I made a pyame do that). The problem is that I can't figure out how to make the boss disappear till the 5min mark and then reappear.

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;


namespace game
{
    public partial class Game : Form
    {
        public Game()
        {
            InitializeComponent();
        }
        bool right, left, up, down, space, A;
        //int Plives = 3;//player lives in game
        int score;
        int p = 0;
        int i = 0;
        playerclass pc = new playerclass();
        int miss = 10;//number of missiles

        void start()
        {
            lblgameover.Visible = false;
            powerarmour.Visible = false;
        }


        void Lives()
        {
            if (pc.Plives > 0)
                pc.Plives -=1;
            if (pc.Plives == 3)
            {
                life1.Visible = true;
                life2.Visible = true;
                life3.Visible = true;
            }
            else if (pc.Plives == 2)
            {
                life1.Visible = false;
                life2.Visible = true;
                life3.Visible = true;
            }
            else if (pc.Plives == 1)
            {
                life1.Visible = false;
                life2.Visible = false;
                life3.Visible = true;
            }
            else if (pc.Plives == 0)
            {
                life1.Visible = false;
                life2.Visible = false;
                life3.Visible = false;
            }
        }
        void Health()
        {
            Random hpup = new Random();
            i++;
            int hp;
            healthup.Left -= 8;
            if (i == 100 && healthup.Left < 0)
            {
                hp = hpup.Next(50, 500);
                healthup.Location = new Point(1200, hp);
                // if (healthup.Left < 0)
            }
            if (i == 500)
                i = 0;
        }
        void HitorMiss()
        {
            foreach (Control j in this.Controls)
            {
                foreach (Control i in this.Controls)
                {
                    if (j is PictureBox && j.Tag == "shot" || j is PictureBox && j.Tag == "missile")
                    {
                        if (i is PictureBox && i.Tag == "enemies")
                        {
                            if (j.Bounds.IntersectsWith(i.Bounds))
                            {

                            }

                        }
                    }
                }
            }
            if (Player.Bounds.IntersectsWith(e1.Bounds) || Player.Bounds.IntersectsWith(e1laser.Bounds) || Player.Bounds.IntersectsWith(e2.Bounds) || Player.Bounds.IntersectsWith(e2laser.Bounds) || Player.Bounds.IntersectsWith(e3.Bounds) || Player.Bounds.IntersectsWith(e3laser.Bounds))
            {
                if (healthbar.Value <= 0)
                {
                    Lives();
                }
                if (pc.Plives == 0)
                {
                    timer1.Stop();
                    lblgameover.Visible = true;
                    lblgameover.Text = "Game over";
                    PictureBox bullet = new PictureBox();
                    bullet.SizeMode = PictureBoxSizeMode.AutoSize;
                    bullet.Image = Properties.Resources.Shoot;
                    bullet.BackColor = System.Drawing.Color.Transparent;
                    ((PictureBox)Player).Image = Properties.Resources.explosion;
                }
                else
                    healthbar.Value -= 10;
            }
            if (Player.Bounds.IntersectsWith(healthup.Bounds))
            {
                if (healthbar.Value <= 90)
                {
                    healthbar.Value += 10;
                }
            }
        }

        void BossShoot()
        {
            e4laser.Left -= 50;
            e5laser.Left -= 50;
            if (e4laser.Left < 0 || e4laser.Left < 0)
            {
                e4laser.Left = powerarmour.Left;
                e4laser.Top = powerarmour.Top + 25;
                e5laser.Left = powerarmour.Left;
                e5laser.Top = powerarmour.Top + 60;
            }
        }
        private int _bossTimerIntervalMins => 5;
        void Boss()
        {
            var bossTimer = new System.Timers.Timer();

            bossTimer.Start();
            //
            e4laser.Visible = false;
            e5laser.Visible = false;
            powerarmour.Visible = false;
            //
            bossTimer.Interval = _bossTimerIntervalMins * 60 * 1000;
            bossTimer.Elapsed += timer1_Tick;
            powerarmour.Visible = true;
            e4laser.Visible = true;
            e5laser.Visible = true;

        }

        void Playermovement()
        {
            if (right == true)
            {
                if (Player.Left < 900)
                {
                    Player.Left += 20;
                }
            }
            if (left == true)
            {
                if (Player.Left > 5)
                {
                    Player.Left -= 15;
                }
            }
            if (up == true)
            {
                if (Player.Top > 20)
                {
                    Player.Top -= 20;
                }
            }
            if (down == true)
            {
                if (Player.Top < 550)
                {
                    Player.Top += 20;
                }
            }
        }
        private void Form1_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Right)
            {
                right = true;
            }
            if (e.KeyCode == Keys.Left)
            {
                left = true;
            }
            if (e.KeyCode == Keys.Up)
            {
                up = true;
            }
            if (e.KeyCode == Keys.Down)
            {
                down = true;
            }
            if (e.KeyCode == Keys.Space)
            {
                space = true;
                Shot();
            }
            if (e.KeyCode == Keys.A)
            {
                if (nomissiles.Value >= 10)
                {
                    miss--;
                    nomissiles.Value -= 10;
                    A = true;
                    Missile();
                }
            }
        }
        void Missile()
        {
            PictureBox m = new PictureBox();
            m.SizeMode = PictureBoxSizeMode.AutoSize;
            m.Image = Properties.Resources.Missile1;
            m.BackColor = System.Drawing.Color.Transparent;
            m.Tag = "missile";
            m.Left = Player.Left + 100;//moves bullet left or right
            m.Top = Player.Top + 55;//55 is perfect
            this.Controls.Add(m);
            m.BringToFront();
        }
        void movemissile()
        {
            foreach (Control y in this.Controls)
            {
                if (y is PictureBox && y.Tag == "missile")
                {
                    y.Left += 100;//x.Top -= 10;
                    if (y.Top > 900)//<100
                    {
                        this.Controls.Remove(y);
                    }
                }
            }
        }
        private void Form1_KeyUp(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Right)
            {
                right = false;
            }
            if (e.KeyCode == Keys.Left)
            {
                left = false;
            }
            if (e.KeyCode == Keys.Up)
            {
                up = false;
            }
            if (e.KeyCode == Keys.Down)
            {
                down = false;
            }
            if (e.KeyCode == Keys.Space)
            {
                space = false;

            }
            if (e.KeyCode == Keys.A)
            {
                A = false;

            }
        }
        void Shot()//positions where players laser shows on the screen
        {
            PictureBox ammo = new PictureBox();
            ammo.SizeMode = PictureBoxSizeMode.AutoSize;
            ammo.Image = Properties.Resources.Shoot;
            ammo.BackColor = System.Drawing.Color.Transparent;
            ammo.Tag = "shot";
            ammo.Left = Player.Left + 100;//moves bullet left or right
            ammo.Top = Player.Top + 55;//55 is perfect
            this.Controls.Add(ammo);
            ammo.BringToFront();
        }
        void MoveShot()
        {
            foreach (Control x in this.Controls)
            {
                if (x is PictureBox && x.Tag == "shot")
                {
                    x.Left += 100;//x.Top -= 10;
                    if (x.Top > 900)//<100
                    {
                        this.Controls.Remove(x);
                    }
                }
            }
            e1laser.Left -= 30;
            if (e1laser.Left < 0)
            {
                e1laser.Left = e1.Left;
                e1laser.Top = e1.Top + 25;
            }
            e2laser.Left -= 30;
            if (e2laser.Left < 0)
            {
                e2laser.Left = e2.Left;
                e2laser.Top = e2.Top + 25;
            }
            e3laser.Left -= 30;
            if (e3laser.Left < 0)
            {
                e3laser.Left = e3.Left;
                e3laser.Top = e3.Top + 25;
            }

        }
        void Enemies_move()
        {
            int a, b, c;
            Random rnd = new Random();
            e1.Left -= 15;
            if (e1.Left < 0)
            {
                a = rnd.Next(30, 560);
                e1.Location = new Point(1200, a);

            }
            //
            e2.Left -= 15;
            if (e2.Left < 0)
            {
                b = rnd.Next(30, 560);
                e2.Location = new Point(1200, b);
            }
            e3.Left -= 15;
            if (e3.Left < 0)
            {
                c = rnd.Next(30, 560);
                e3.Location = new Point(1200, c);
            }
        }
        private void Game_Load(object sender, EventArgs e)
        {

        }
        private void timer1_Tick(object sender, EventArgs e)
        {

            start();
            Boss();
            Health();
            MoveShot();
            Playermovement();
            Enemies_move();
            HitorMiss();
            movemissile();

        }
    }
}

Random images from imagelist

Trying to make a game where explosions randomly appear on the screen using visual studio. I figured out how to make a single picture change location on the screen. So, I wanted to make the illusion of an explosion using imagelist. When I try to do it I get an error on my visual studio when I try to use Location. Location is underlined and say the following "ImageList" does not contain a definition for "Location" and no accessible extension method "Location" accepting a first argument of type "ImageList" could be found (Are you missing a using directive or an assembly reference?) I wanted to add more explosions on the screen .

 using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace random_image
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }
        int num = 0;
        void Randompics()
        {
            int a;
            Random rnd = new Random();
            a = rnd.Next(30, 450);
            boom.Location = new Point(500, a);
        }
        void Explosions()
        {
            /*
            int a;
            Random rnd = new Random();
            a = rnd.Next(30, 450);
            symbol.Location = new Point(500, a);
            */
            Random rnd = new Random();
            int a;
            int x = rnd.Next(0, 800);
            int y = rnd.Next(0, 500);
            imageList1.Location = new Point(x,y);
            boom.Image = imageList1.Images[num];
            if (num == imageList1.Images.Count - 1)
            {
                num = 0;
            }
            else
                num++;
        }
        private void timer1_Tick(object sender, EventArgs e)
        {
            Explosions();
            //Randompics();
        }
    }
}