1.Timerprivate void timer3_Tick(object sender, EventArgs e)
        {
            
            ss++;
            WMPLib.IWMPMedia currentMedia = axWindowsMediaPlayer1.currentMedia;
            if (ss == 60)
            {
                mm += 1;
                ss = 0;
            }
            
            label5.Text = "Time:" + mm.ToString("00") + ":" + ss.ToString("00") + "/" +    currentMedia.durationString;            if (label5.Text == currentMedia.durationString)
            {
                label5.Text = "";
                ss = 0;
                mm = 0;
            }
        }   停止它的时候lable5的值是01:25/03:33       停止它在运行以后是从01:25开始在往上加呢不是应该是00:00/04:44开始计算吗   Timer3释放了也不行呢一首歌播放完了  怎么能让listbox的指针往下移动啊     我的歌播放的是下一首  可是指针不是指在一下首  还是指在上次播放的上面你要有时间能给详细点代码吗?谢谢

解决方案 »

  1.   

    播放完一首歌之后,应该计数器重新开始计数。暂停的时候是让Timer的Enable属性为false,取消暂停Enable为true。
    播放完一首之后,然ListBox中当前选中项的下一项处于选中状态。通过SelectedIndex来获取当前选中第几项。
      

  2.   

    停止后设置
    timer.stop();   
    timer.enable=false; 
    开始后就重新开始计数.  
      

  3.   

    楼主计算歌曲播放时间的方式还真是新颖应该:分钟 = 总秒数/60, 秒 = 总秒数%60歌曲播放完毕后,停止定时器,把总秒数置0,然后开始播放下一首时再重新启动定时器,在定时器的Tick里是  ++总秒数
      

  4.   

    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Text;
    using System.Windows.Forms;namespace WindowsApplication1
    {
        public partial class Form1 : Form
        {
            int i=0;
            public int I
            {
                get
                {
                    return i;
                }
                set { i = value; }
            }
            public Form1()
            {
                InitializeComponent();
            }        private void timer1_Tick(object sender, EventArgs e)
            {           
                i++;
                label1.Text = Convert.ToString(i);
            }        private void button1_Click(object sender, EventArgs e)
            {
                //timer1.Enabled = true;
                timer1.Start();
            }        private void button2_Click(object sender, EventArgs e)
            {
                timer1.Stop();
                timer1.Enabled = false;
                
            }
        }
    }还是按上次的数开始加呢
      

  5.   

    LZ你用timer来播放计时?
    不是有这样的属性吗 干嘛不用AxWMPLib.AxWindowsMediaPlayer.controls.currentPosition         double;
    //当前进度
    AxWMPLib.AxWindowsMediaPlayer.controls.currentPositionString   string;
    //当前进度字符串格式“00:23”
      

  6.   

    controls不是静态方法 
    AxWMPLib.AxWindowsMediaPlayer  object.controls...
      

  7.   


    引用 8 楼 Error_Code 的回复: 
    LZ你用timer来播放计时? 
    不是有这样的属性吗 干嘛不用 AxWMPLib.AxWindowsMediaPlayer.controls.currentPosition        double; 
    //当前进度 
    AxWMPLib.AxWindowsMediaPlayer.controls.currentPositionString  string; 
    //当前进度字符串格式“00:23” 对啊  是做计时 
     
    controls不是静态方法 
    AxWMPLib.AxWindowsMediaPlayer  object.controls...