Share via


Player6.CurrentPosition (deprecated)

Windows Media Player SDK banner art

This page documents a feature of the Windows Media Player 6.4 ActiveX control. We recommend that you migrate your content to use the Windows Media Player 9 Series ActiveX control. For more information about the Windows Media Player 9 Series ActiveX control, see the Windows Media Player 9 Series SDK.

This property specifies or retrieves the clip's current position, in seconds.

Syntax

MediaPlayer.CurrentPosition

Possible Values

This property is a read/write Double with no default value.

Remarks

The value of this property is a new position within the clip, in seconds. This property is only valid for playback of local content.

Setting this property at run time is similar to performing a seek operation, and changes the position to the specified point in the clip. The new value must be within the range specified by the SelectionStart and SelectionEnd properties.

Before attempting to set this property, determine the length of the file in seconds by retrieving the value of the Duration property.

Before the FileName property is set, CurrentPosition returns -1 (minus one).

The current position value displayed by Windows Media Player can represent either seconds or frames. The DisplayMode property determines which units are shown.

Example

This example shows how to use the CurrentPosition property to rewind a clip after it has been stopped:

MediaPlayer1.Stop
MediaPlayer1.CurrentPosition = 0

Requirements

Version: Windows Media Player version 6.4.

Library: Use msdxm.ocx.

Platform: Windows 98 Second Edition or higher.

See Also