I have 3 Forms.
Form2is used as a background form. It loops a video using windows media player.Form3is a menu form with two buttons - Picture and Video.Form4is the video form. It plays a video when it is opened using windows media player.
My problem: When I open Form4(video) I need to pause or stop Form2(background). This is because the Form4 video will lagg/stutter when I play video on Form2 and kat the same time.
My attempt:
private Form4 f4 = new Form4();
private void StopVideo()
{
if (f4.Visible)
{
axWindowsMediaPlayer2.Ctlcontrols.stop();
}
else
{
axWindowsMediaPlayer2.Ctlcontrols.play();
}
}
axWindowsMediaPlayer2 is the player in Form2. I want to stop it when Form4 is active/visible and start it when Form4 is closed.
Aucun commentaire:
Enregistrer un commentaire