IWMPControls::currentPosition 속성
[이 페이지와 연결된 기능인 Windows 미디어 플레이어 SDK는 레거시 기능입니다. MediaPlayer로 대체되었습니다. MediaPlayer는 Windows 10 및 Windows 11 최적화되었습니다. 가능한 경우 새 코드에서 Windows 미디어 플레이어 SDK 대신 MediaPlayer를 사용하는 것이 좋습니다. 가능한 경우 레거시 API를 사용하는 기존 코드를 다시 작성하여 새 API를 사용하도록 제안합니다.]
currentPosition 속성은 미디어 항목의 현재 위치를 시작부터 초 단위로 가져오거나 설정합니다.
구문
public System.Double currentPosition {get; set;}
Public Property currentPosition As System.Double
속성 값
현재 위치인 System.Double 입니다.
예제
다음 예제에서는 currentPosition 을 사용하여 사용자가 제공한 위치를 찾습니다. 단추 클릭에 대한 응답으로 currentPosition은 newPosition 이라는 텍스트 상자에 입력된 값으로 설정됩니다. AxWMPLib.AxWindowsMediaPlayer 개체는 player라는 변수로 표시됩니다.
private void setPosition_Click(object sender, System.EventArgs e)
{
// ...Add code to ensure that the text box contains a valid value.
// Set the current position of the media item to the position entered by the user.
player.Ctlcontrols.currentPosition = Convert.ToDouble(newPosition.Text);
}
Public Sub setPosition_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles setPosition.Click
' ...Add code to ensure that the text box contains a valid value.
' Set the current position of the media item to the position entered by the user.
player.Ctlcontrols.currentPosition = Convert.ToDouble(newPosition.Text)
End Sub
요구 사항
요구 사항 | 값 |
---|---|
버전 |
Windows 미디어 플레이어 9 시리즈 이상 |
네임스페이스 |
WMPLib |
어셈블리 |
|
추가 정보
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기