Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
.gif)
| Previous | Next |
IWMPSettings.mute (VB and C#)
The mute property gets or sets a value indicating whether audio is muted.
Property Value
A System.Boolean value indicating whether audio is muted. The default is false.
Example Code
The following example creates a check box, and toggles the mute property to mute and un-mute audio when the checked state of the box is changed. AxWMPLib.AxWindowsMediaPlayer object is represented by the variable named player.
Public Sub Mute_CheckStateChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles Mute.CheckStateChanged
Dim cb As System.Windows.Forms.CheckBox = sender
' Change the check box text depending on the checked state.
If (cb.Checked) Then
cb.Text = "Un-mute Audio"
Else
cb.Text = "Mute Audio"
End If
' Use the checked state to set the mute property.
player.settings.mute = cb.Checked
End Sub
FakePre-dbb5c3f015b74b739a38838bf47d1fc8-53d3e80427034875b11a3073ae46c930
private void Mute_CheckStateChanged(object sender, System.EventArgs e)
{
System.Windows.Forms.CheckBox Mute = (System.Windows.Forms.CheckBox)sender;
// Change the check box text depending on the checked state.
Mute.Text = Mute.Checked ? "Un-mute Audio" : Mute.Text = "Mute Audio";
// Use the checked state to set the mute property.
player.settings.mute = Mute.Checked;
}
Requirements
Version: Windows Media Player 9 Series or later
Namespace: WMPLib
Assembly: Interop.WMPLib.dll (automatically generated by Visual Studio)
See Also
| Previous | Next |