12 Replies - 7686 Views - Last Post: 30 March 2011 - 07:55 AM Rate Topic: -----

#1 hamzahkh   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 18
  • Joined: 30-March 11

mute picture box problem

Posted 30 March 2011 - 05:50 AM

i work on media player for my own every this is working good but when i play a sound file and press on mute(picture box)
it's muted the sound but when i open another sound file the sound of the file is play and the mute picture box show's that the sound is muted .
i need to set the sound mute if i pressed on the picture box and when open any formate the sound must still muted until
i pressed on mute picture box to unmute the sound
ihope my question is clear
and this is the mute code in my project
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    




and i attached the panel that's include the mute picture box

Attached image(s)

  • Attached Image


Is This A Good Question/Topic? 0
  • +

Replies To: mute picture box problem

#2 Luc001   User is offline

  • D.I.C Addict

Reputation: 84
  • View blog
  • Posts: 617
  • Joined: 04-May 09

Re: mute picture box problem

Posted 30 March 2011 - 06:22 AM

Hi,

Hi,

You can try this:

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")    
      Else
            
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    


Was This Post Helpful? 0
  • +
  • -

#3 hamzahkh   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 18
  • Joined: 30-March 11

Re: mute picture box problem

Posted 30 March 2011 - 06:44 AM

View PostLuc001, on 30 March 2011 - 06:22 AM, said:

Hi,

Hi,

You can try this:

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")    
      Else
            
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    




It do'snt work man
Was This Post Helpful? 0
  • +
  • -

#4 hamzahkh   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 18
  • Joined: 30-March 11

Re: mute picture box problem

Posted 30 March 2011 - 06:50 AM

View PostLuc001, on 30 March 2011 - 06:22 AM, said:

Hi,

Hi,

You can try this:

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")    
      Else
            
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    


i dos'nt work plzzzz
Was This Post Helpful? 0
  • +
  • -

#5 Luc001   User is offline

  • D.I.C Addict

Reputation: 84
  • View blog
  • Posts: 617
  • Joined: 04-May 09

Re: mute picture box problem

Posted 30 March 2011 - 06:51 AM

Hi,

Does it Mute and Unmute properly.
Was This Post Helpful? 0
  • +
  • -

#6 CharlieMay   User is offline

  • This space intentionally left blank
  • member icon

Reputation: 1729
  • View blog
  • Posts: 5,708
  • Joined: 25-September 09

Re: mute picture box problem

Posted 30 March 2011 - 06:51 AM

Where is the code where you're playing the next song, are you turning the sound back on there?
Was This Post Helpful? 0
  • +
  • -

#7 hamzahkh   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 18
  • Joined: 30-March 11

Re: mute picture box problem

Posted 30 March 2011 - 06:58 AM

View PostLuc001, on 30 March 2011 - 06:51 AM, said:

Hi,

Does it Mute and Unmute properly.


Quote

yes it mute and unmute but if u open new song or playlist and you in mute mode then it's turned to un-mute mode
and the picture in picture box it's for mute mode

Was This Post Helpful? 0
  • +
  • -

#8 Luc001   User is offline

  • D.I.C Addict

Reputation: 84
  • View blog
  • Posts: 617
  • Joined: 04-May 09

Re: mute picture box problem

Posted 30 March 2011 - 07:01 AM

Hi,

Like CharlieMay asked, can you show us the code for the new song.
Was This Post Helpful? 0
  • +
  • -

#9 hamzahkh   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 18
  • Joined: 30-March 11

Re: mute picture box problem

Posted 30 March 2011 - 07:03 AM

View PostCharlieMay, on 30 March 2011 - 06:51 AM, said:

Where is the code where you're playing the next song, are you turning the sound back on there?


this code for playing next song
 Private Sub Next_PictureBox_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Next_PictureBox.Click
        Try
            If Playlist.Items.Count > 0 Then
                If Playlist.SelectedIndex < Playlist.Items.Count - 1 Then
                    Playlist.SelectedIndex += 1
                    AxWindowsMediaPlayer1.URL = ListBox1.SelectedItem
                    Me.Text = "BVP - " & Playlist.SelectedItem
                Else
                    MsgBox("No Next Music", MsgBoxStyle.Information, "Maestro")
                End If
            End If
        Catch ex As Exception
            MessageBox.Show(ex.Message & ex.Source)
        End Try
    End Sub



View PostLuc001, on 30 March 2011 - 07:01 AM, said:

Hi,

Like CharlieMay asked, can you show us the code for the new song.


next song code
 Private Sub Next_PictureBox_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Next_PictureBox.Click
        Try
            If Playlist.Items.Count > 0 Then
                If Playlist.SelectedIndex < Playlist.Items.Count - 1 Then
                    Playlist.SelectedIndex += 1
                    AxWindowsMediaPlayer1.URL = ListBox1.SelectedItem
                    Me.Text = "BVP - " & Playlist.SelectedItem
                Else
                    MsgBox("No Next Music", MsgBoxStyle.Information, "Maestro")
                End If
            End If
        Catch ex As Exception
            MessageBox.Show(ex.Message & ex.Source)
        End Try
    End Sub


Was This Post Helpful? 0
  • +
  • -

#10 Luc001   User is offline

  • D.I.C Addict

Reputation: 84
  • View blog
  • Posts: 617
  • Joined: 04-May 09

Re: mute picture box problem

Posted 30 March 2011 - 07:09 AM

Hi,

What do you want when you open a new song?
Was This Post Helpful? 0
  • +
  • -

#11 hamzahkh   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 18
  • Joined: 30-March 11

Re: mute picture box problem

Posted 30 March 2011 - 07:13 AM

View PostLuc001, on 30 March 2011 - 07:09 AM, said:

Hi,

What do you want when you open a new song?

Quote

if the project is in mute mode i want to still in this mode

Was This Post Helpful? 0
  • +
  • -

#12 Luc001   User is offline

  • D.I.C Addict

Reputation: 84
  • View blog
  • Posts: 617
  • Joined: 04-May 09

Re: mute picture box problem

Posted 30 March 2011 - 07:25 AM

Hi,

You can try something like this:

Private Sub Next_PictureBox_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Next_PictureBox.Click
       Try
           If Playlist.Items.Count > 0 Then
               If Playlist.SelectedIndex < Playlist.Items.Count - 1 Then
                   Playlist.SelectedIndex += 1
                   AxWindowsMediaPlayer1.URL = ListBox1.SelectedItem
                    If MuteBol = False Then  
           AxWindowsMediaPlayer1.settings.mute = False    
        
               If      MuteBol = True  Then      
           AxWindowsMediaPlayer1.settings.mute = True     
               End if
                     
                   Me.Text = "BVP - " & Playlist.SelectedItem
               Else
                   MsgBox("No Next Music", MsgBoxStyle.Information, "Maestro")
               End If
           End If
       Catch ex As Exception
           MessageBox.Show(ex.Message & ex.Source)
       End Try
   End Sub

This post has been edited by Luc001: 30 March 2011 - 07:27 AM

Was This Post Helpful? 0
  • +
  • -

#13 hamzahkh   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 18
  • Joined: 30-March 11

Re: mute picture box problem

Posted 30 March 2011 - 07:55 AM

View PostLuc001, on 30 March 2011 - 07:25 AM, said:

Hi,

You can try something like this:

Private Sub Next_PictureBox_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Next_PictureBox.Click
       Try
           If Playlist.Items.Count > 0 Then
               If Playlist.SelectedIndex < Playlist.Items.Count - 1 Then
                   Playlist.SelectedIndex += 1
                   AxWindowsMediaPlayer1.URL = ListBox1.SelectedItem
                    If MuteBol = False Then  
           AxWindowsMediaPlayer1.settings.mute = False    
        
               If      MuteBol = True  Then      
           AxWindowsMediaPlayer1.settings.mute = True     
               End if
                     
                   Me.Text = "BVP - " & Playlist.SelectedItem
               Else
                   MsgBox("No Next Music", MsgBoxStyle.Information, "Maestro")
               End If
           End If
       Catch ex As Exception
           MessageBox.Show(ex.Message & ex.Source)
       End Try
   End Sub

Quote

it do'snt work to i attached pic and this code for open new video dialog hope is helpfull

 Private Sub ToolStripMenuItem26_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripMenuItem26.Click
        Try
            openbol = True
            If OpenFileDialog1.ShowDialog = Windows.Forms.DialogResult.OK Then
                Play_PictureBox.Enabled = True
                Playlist.SelectedIndex = 0
                AxWindowsMediaPlayer1.URL = ListBox1.SelectedItem
                Me.Text = "BVP - " & Playlist.SelectedItem
                Playlist.Show()
                hide_playlistbol = True
                ClearAllToolStripMenuItem.Enabled = True
                ClearList_PictureBox.Enabled = True
                Add_PictureBox.Enabled = True
            End If
        Catch ex As Exception
            MessageBox.Show(ex.Message & ex.Source)
        End Try
    End Sub

Attached image(s)

  • Attached Image

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1