在c#中实现

解决方案 »

  1.   

    System.Media.SoundPlayer player =new System.Media.SoundPlayer();
                player.SoundLocation = "";
                player.Load();
                player.Play();[DllImport("kernel32.dll")]   
      private static extern int Beep(int dwFreq ,int dwDuration) ;     [DllImport("winmm.dll" , EntryPoint="PlaySound")]
      public static extern int PlaySound(string lpxzName, int hModul, int dwFlags);
      

  2.   

    调主板喇叭用1楼beep
    音响和耳机用2楼play