using System.Runtime.InteropServices;

 

[DllImport("kernel32.dll")] 
public static extern bool Beep(int freq,int duration);

public void PlayBeep()  
{  
     //调用  
     Beep(800,3000); 
}

相关文章: