Share via


IWMPSettings::mute property

[The feature associated with this page, Windows Media Player SDK, is a legacy feature. It has been superseded by MediaPlayer. MediaPlayer has been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use MediaPlayer instead of Windows Media Player SDK, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]

The mute property gets or sets a value indicating whether audio is muted.

Syntax

public System.Boolean mute {get; set;}

Public Property mute As System.Boolean

Property value

A System.Boolean value indicating whether audio is muted. The default is false.

Examples

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.

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;
}

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

Requirements

Requirement Value
Version
Windows Media Player 9 Series or later
Namespace
WMPLib
Assembly
Interop.WMPLib.dll (Interop.WMPLib.dll.dll)

See also

IWMPSettings Interface (VB and C#)

IWMPSettings.rate (VB and C#)