Important: |
---|
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist. |
Sets or retrieves a value representing the clip's current position, in seconds.
Compatibility:Windows Media Player, ActiveMovie
MediaPlayer.CurrentPosition [ = dblPosition ]
Parameters
Remarks
The value of this property is a new position within the clip, in seconds.
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 SelectionStartand SelectionEndproperties.
Before attempting to set this property, determine the length of the file in seconds by retrieving the value of the Durationproperty.
Before the
FileNameproperty is set,
CurrentPositionreturns
-1
(minus one).
Example
This example shows how to use the CurrentPositionproperty to rewind a clip after it has been stopped:
MediaPlayer1.Stop( ); MediaPlayer1.CurrentPosition = 0;
See Also
Playback Methods and Properties