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的指针往下移动啊 我的歌播放的是下一首 可是指针不是指在一下首 还是指在上次播放的上面你要有时间能给详细点代码吗?谢谢
{
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的指针往下移动啊 我的歌播放的是下一首 可是指针不是指在一下首 还是指在上次播放的上面你要有时间能给详细点代码吗?谢谢
播放完一首之后,然ListBox中当前选中项的下一项处于选中状态。通过SelectedIndex来获取当前选中第几项。
timer.stop();
timer.enable=false;
开始后就重新开始计数.
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;
}
}
}还是按上次的数开始加呢
不是有这样的属性吗 干嘛不用AxWMPLib.AxWindowsMediaPlayer.controls.currentPosition double;
//当前进度
AxWMPLib.AxWindowsMediaPlayer.controls.currentPositionString string;
//当前进度字符串格式“00:23”
AxWMPLib.AxWindowsMediaPlayer object.controls...
引用 8 楼 Error_Code 的回复:
LZ你用timer来播放计时?
不是有这样的属性吗 干嘛不用 AxWMPLib.AxWindowsMediaPlayer.controls.currentPosition double;
//当前进度
AxWMPLib.AxWindowsMediaPlayer.controls.currentPositionString string;
//当前进度字符串格式“00:23” 对啊 是做计时
controls不是静态方法
AxWMPLib.AxWindowsMediaPlayer object.controls...