Onion13 31 Junior Poster in Training

Can you give me some examples or a link? I am using visual studio on a windows computer.

rproffitt commented: Sorry but there are so many versions of Visual Studio. If the above didn't compile, could be a setup issue. +16
Onion13 31 Junior Poster in Training

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;
HuiCheng commented: i think you Pc audio have program,my windows 11 can start,is you audio have program? +0
Onion13 31 Junior Poster in Training

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.

KevinYoung commented: You are trying to make a great game, but it's true that it's missing something about the level, you can look up more on the internet for similar games +0
Onion13 31 Junior Poster in Training

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();
        }
Onion13 31 Junior Poster in Training

I figured it out. The answer was right in front of my eyes and I didn't see it. Thank you for your help.

Onion13 31 Junior Poster in Training

I did what you suggested and tried to do the same thing I have for next level that I have on new game and it still doesn't work. Do you have any other ideas? I'm really stuck

rproffitt commented: That item was the only item that stuck out to me. Again, look for what's different from a new board to this nextlevel. +15
Onion13 31 Junior Poster in Training

How do you call a constructor to initialize a variable using form1?