熟悉使用Windows Media Play 制作音乐播放器
//定时器出发TrackBar
private void timer1_Tick(object sender, EventArgs e)
{
trackBar1.Maximum = (int)axWindowsMediaPlayer1.currentMedia.duration;
//通过Time Tick没Value 500ms 更新Track Bar位置
trackBar1.Value = (int)axWindowsMediaPlayer1.Ctlcontrols.currentPosition;
//timer 事件检查播放器状态Stop时自动进入下一首
nextMusic();
}
2022-07-26 19:07:18
47KB
C#
1