紧急求助啊,发现了一个axWindowsMediaPlayer.currentMedia.attributeCount天大bug?分数不多但是问题很严重~~~~
本机环境:windows7下,vs2005 winform里面引用了WindowsMediaPlayer控件,本来是打算做个播放列表的,好啦~~问题来了:
string strInfo = "";
if (open.ShowDialog() == DialogResult.OK)
{
axWindowsMediaPlayer1.URL = open.FileName;
//MessageBox.Show(""); (关键点)区别所在!!!!!!!!!!!!!!
for (int i = 0; i < axWindowsMediaPlayer1.currentMedia.attributeCount; i++)
{
strInfo = strInfo + axWindowsMediaPlayer1.newMedia(open.FileName).getItemInfo(axWindowsMediaPlayer1.currentMedia.getAttributeName(i)) + "\n";
}
MessageBox.Show(strInfo);
}
如果就现在这样去运行的话,出现的结构是axWindowsMediaPlayer1.currentMedia.attributeCount=1
而如果去掉关键点那一行的注释以后 axWindowsMediaPlayer1.currentMedia.attributeCount=21
为什么呢为什么呢!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!