Share via


IWMPControls (VB and C#) interface

[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.]

Provides a way to manipulate the playback of a media item by representing the transport controls of Windows Media Player, such as Play, Stop, and Pause.

The IWMPControls interface exposes the following properties.

Members

The IWMPControls (VB and C#) interface has these types of members:

Methods

The IWMPControls (VB and C#) interface has these methods.

Method Description
fastForward Starts fast play of the media item in the forward direction.
fastReverse Starts fast play of the media item in the reverse direction.
next Sets the next item in the playlist as the current item.
pause Pauses playback of the media item.
play Begins playback of the current media item, or resumes playback of a paused item.
playItem Plays the specified media item.
previous Sets the previous item in the playlist as the current item.
stop Stops playback of the media item.

Properties

The IWMPControls (VB and C#) interface has these properties.

Property Access type Description
currentItem
Read/write
Gets or sets the current media item in a playlist.
currentMarker
Read/write
Gets or sets the current marker number.
currentPosition
Read/write
Gets or sets the current position in the media item in seconds from the beginning.
currentPositionString
Read-only
Gets the current position in the media item as a System.String.
isAvailable
Read-only
Gets a value indicating whether a specified type of information is available or a specified action can be performed. In C#, this is the get_isAvailable method.

Get an IWMPControls interface by using the following property.

Object Property
AxWindowsMediaPlayer Object Ctlcontrols

Requirements

Requirement Value
Header
Wmp.h

See also

Interfaces for Visual Basic .NET and C#

IWMPControls2 Interface (VB and C#)

IWMPControls3 Interface (VB and C#)