O
O
Odyvanchik2018-05-18 09:25:04
C++ / C#
Odyvanchik, 2018-05-18 09:25:04

How can I add different music to each form individually in a WindowsForms application that consists of several forms?

Does a specific kind of code work only on one (first) form, and on the rest it gives an error?

spoiler
5afe71acc569a023545953.jpeg
private void tab_russ_Load(object sender, EventArgs e)
        {
            System.Media.SoundPlayer Audio2;
            Audio2 = new System.Media.SoundPlayer(Properties.Resources.RUS);
            Audio2.Play();
        }

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Artem, 2018-05-20
@devspec

The problem is here:
Inside the resource specified is not what is expected as an argument to the SoundPlayer

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question