Share via


Windows Media Player 11 SDK AxWindowsMediaPlayer.close (VB and C#) 

Windows Media Player SDK banner art

Previous Next

AxWindowsMediaPlayer.close (VB and C#)

The close method closes the current digital media file, stops playback in Windows Media Player and releases Windows Media Player resources.

[Visual Basic]
Public Overridable Sub close()

[C#]
public virtual void close ()

Remarks

This method closes the current digital media file, not Windows Media Player itself.

Example Code

The following example creates a button that, when clicked, stops playback in Windows Media Player and releases the resources in use. The AxWMPLib.AxWindowsMediaPlayer object is represented by the variable named player.

[Visual Basic]
Public Sub closeIt_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles closeIt.Click

    ' Close the Player. 
    player.close()

End Sub

FakePre-20d4caf9cea4423d981481a8cba847d2-c40db5faa5264a539c730aae0385ab3e

private void closeIt_Click(object sender, System.EventArgs e)
{
    // Close the Player. 
    player.close();
}

Requirements

Version: Windows Media Player 9 Series or later

Namespace: AxWMPLib

Assembly: AxInterop.WMPLib.dll (automatically generated by Visual Studio)

See Also

Previous Next