播放MP3文件,怎么编程显示播放时间 播放mp3文件时,一般windows media player右下角都会显示显示播放时间,现在怎么编程把播放时的时间显示出来,最好能提供一下具体的代码和必要的注释,因为本人水平很差。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 http://www.codeproject.com/KB/WPF/podder1.aspx下载回来看看吧~写的很棒的 DateTime.ToString();放到你的播放器的这个某个位置也可以撒 加个漂亮点的Label之类的吧 string duration = "";rivate void timer1_Tick(object sender, EventArgs e) { duration = this.axWmp.currentMedia.durationString;this.lblDuration.Text = Duration; } 哦你显示播放时间哈,那你作个DateTime dt=播放时的时间记录DateSpan ds= DateTime.Now-dt;Label showTime;用线程更新Thread t=new Thread(()=>{ while(播放没停止){ this.showTime.Invoke(Delegate.CreateDelegate(typeof(Action),this,"ShowTime")); Thread.Sleep(1000); }});void ShowTime(){ this.showTime.Text=(DateTime.Now-dt).ToShortString();} TreeView 关于添加子节点的问题! 求助求助-急--请各位高手帮帮忙 关于Remoting的问题 在c#中使用WebProxy访问页面的问题。 SQL数据库访问 全角和半角比较问题。(急) vs.net2003打包framework1.1和mdac2.7问题???请大家指教!! 视频开发 .net中如何去除弹出对话框的状态栏 高分求"OPC .NET API 2.00 Redistributables" 播放音乐 救助!!!,two 如何自动更新数据库中的某个字段值 求高效的2-6位字符串穷举程序代码
下载回来看看吧~写的很棒的
rivate void timer1_Tick(object sender, EventArgs e)
{
duration = this.axWmp.currentMedia.durationString;
this.lblDuration.Text = Duration;
}
DateTime dt=播放时的时间记录
DateSpan ds= DateTime.Now-dt;
Label showTime;
用线程更新Thread t=new Thread(()=>{
while(播放没停止){
this.showTime.Invoke(Delegate.CreateDelegate(typeof(Action),this,
"ShowTime"));
Thread.Sleep(1000);
}
});
void ShowTime(){
this.showTime.Text=(DateTime.Now-dt).ToShortString();
}