need help in this ( mute picture box problem )
iam working in media player for my own every thing in code is working but if i pressed on mute picture box to mute sound and re-open another video or music file the sound is playing and the sign in mute picture box is show that iam in mute mode this is the 开发者_运维技巧code for mute picture box :
Private Sub Volume_PictureBox_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Volume_PictureBox.Click
Try
If MuteBol = False Then
AxWindowsMediaPlayer1.settings.mute = True
MuteBol = True
Volume_PictureBox.Image = My.Resources.Muted_Volume_Hover'mute picture
MuteToolStripMenuItem.Checked = True
Me.ToolTip1.SetToolTip(Volume_PictureBox, "UnMute")
ElseIf MuteBol = True Then
AxWindowsMediaPlayer1.settings.mute = False
MuteBol = False
Volume_PictureBox.Image = My.Resources.Volume_Hover'un-mute picture
MuteToolStripMenuItem.Checked = False
Me.ToolTip1.SetToolTip(Volume_PictureBox, "Mute")
End If
Catch ex As Exception
MessageBox.Show(ex.Message & ex.Source)
End Try
End Sub
Not to answer for Hans, but if what you need is for newly opened songs to be muted if mute is already selected, it looks like you just need something simple, like:
If [a new song is opened or the current file changes or something like this]
If MuteBol = True Then AxWindowsMediaPlayer1.settings.mute = True
End If
Seems simple enough, unless this isn't what you're looking for. Hope this works!
精彩评论