2015-04-05 61 views

回答

1

如果我理解你的問題正確,然後用WMPLib.WindowsMediaPlayer,添加引用 「Windows Media Player的」 從COM然後通過使用設置的位置:

WMPLib.WindowsMediaPlayer player = new WMPLib.WindowsMediaPlayer(); 
player.URL = file; //file to be played 
player.controls.play(); 
player.controls.currentPosition = x; //set the position you want here when user drag 

或者您可以使用naudio免費開源API,從codeplex下載:

Naudio Library