using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;namespace Example{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
...
添加microsoft media player .dll的时候请注意版本,要考虑到用户机的MediaPlayer的版本问题。具体的可以再MSDN上查SoundPlayer类下面是同步播放声音,异步请查阅MSDNusing System.Media;private void playSimpleSound(){
SoundPla...