using System.Runtime.InteropServices;

引用命名空间


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

调用系统dll 


Beep(0X0FF,100); 

oxxff    表示声音  类型  二进制    自己可以改变

100    声音响的时长......

相关文章:

  • 2021-11-18
  • 2021-06-28
  • 2022-12-23
  • 2021-10-26
  • 2021-10-27
  • 2021-09-29
  • 2021-12-25
  • 2021-11-07
猜你喜欢
  • 2021-09-25
  • 2021-07-03
  • 2022-12-23
  • 2022-01-15
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案