Following is a portion of my project code.It contain a Timer
,Windows Media Player
,etc. This project does,
here five user given times and when to reach this times to current time, then WMP will play.
Can you please suggest a code to:
while playing this in WMP,mute all other sounds,only WMP's sound should be heard.
public void play(string tune)
{
if (label1.Text == label6.Text || label2.Text == label6.Text || label3.Text == label6.Text || label4.Text == label6.Text || label5.Text == label6.Text)
{
axWindowsMediaPlayer1.URL = tune;
if (label6.Text == label1.Text)
{
DialogResult yn = MessageBox.Show("Times to reach pray LUHAR", "Attention Pls:", MessageBoxButtons.OK);
if (yn == DialogResult.OK) { axWindowsMediaPlayer1.Ctlcontrols.stop(); }
}
else if (label6.Text == label2.Text)
{
DialogResult yn = MessageBox.Show("Times to reach pray ASAR", "Attention Pls:", MessageBoxButtons.OK);
if (yn == DialogResult.OK) { axWindowsMediaPlayer1.Ctlcontrols.stop(); }
}
else if (label6.Text == label3.Text)
{
DialogResult yn = MessageBox.Show("Times to reach pray MAGRIB", "Attention Pls:", MessageBoxButtons.OK);
if (yn == DialogResult.OK) { axWindowsMediaPlayer1.Ctlcontrols.stop(); }
}
else if (label6.Text == label4.Text)
{
DialogResult yn = MessageBox.Show("Times to reach pray ISHAH", "Attention Pls:", MessageBoxButtons.OK);
if (yn == DialogResult.OK) { axWindowsMediaPlayer1.Ctlcontrols.stop(); }
}
else if (label6.Text == label5.Text)
{
DialogResult yn = MessageBox.Show("Times to reach pray SUBAH", "Attention Pls:", MessageBoxButtons.OK);
if (yn == DialogResult.OK) { axWindowsMediaPlayer1.Ctlcontrols.stop(); }
}
}
}