如何使用C#打开某个音频文件,或视频文件?

来源:百度知道 编辑:UC知道 时间:2024/06/04 00:51:05
环境是VS2005,想自己做个闹钟,在特定的时间打开某个音频或视频文件发出声音,请问该怎么写?
最好有一小段的例子,谢谢

http://www.zu14.cn/2009/02/13/dotnet-system-media-soundplayer/
http://www.zu14.cn/2009/01/24/dotnet-mediaplayer/

OpenFileDialog openFileDialog1 = new OpenFileDialog();
openFileDialog1.Filter = "*.mp3|*.mp3|所有文件(*.*)|*.*";
openFileDialog1.Multiselect = true;
if (openFileDialog1.ShowDialog() == DialogResult.OK)
{
this.lstSong.Items.AddRange(openFileDialog1.FileNames);
}
打开文件就这段代码了!自己慢慢试试就知道了.