- string name = System.Environment.CurrentDirectory + "\\1.mp3";
- StringBuilder shortpath = new StringBuilder(80);
- int result = GetShortPathName(name, shortpath, shortpath.Capacity);
- name = shortpath.ToString();
- mciSendString(@"close all", null, 0, 0);
- mciSendString(@"open " + name + " alias song", null, 0, 0); //打开
- mciSendString("play song", null, 0, 0); //播放
- OldCout1 = NewCout1;
复制代码 找了写资料,希望对你有帮助
http://wenku.baidu.com/view/3ee2624333687e21af45a9b7.html |