So i have 2 forms, one is called "musica" and its playing a music (this form is invisible) and the other is called "Form1" and gives the option to stop and start the music with radio buttons.
The problem is that the radio buttons are working, but the video continues even if i click on "radionButton2" and if i use the "stop()" function on "musica_load" the music stops so i don't think the problem is from there either.
What is my mistake here?
Form1 code:
musica mus = new musica();
private void radioButton1_CheckedChanged(object sender, EventArgs e)
{
if (radioButton1.Checked == true)
{
mus.play();
}
}
private void radioButton2_CheckedChanged(object sender, EventArgs e)
{
if (radioButton2.Checked == true)
{
mus.stop();
}
}
musica code:
public void play()
{
axWindowsMediaPlayer1.Ctlcontrols.play();
}
public void stop()
{
axWindowsMediaPlayer1.Ctlcontrols.stop();
}