C#让电脑发声,播放声音
2024-08-26 05:32:11
//1.
[DllImport("Kernel32.dll")] //引入命名空间 using System.Runtime.InteropServices;
public static extern bool Beep(int frequency, int duration);// 第一个参数是指频率的高低,越大越高,第二个参数是指响的时间多 Beep(, ); //2.
[DllImport("winmm.dll")]
public static extern bool PlaySound(String Filename, int Mod, int Flags); PlaySound(@"C:\Windows\media\Windows Proximity Notification.wav", , );
最新文章
- C++模拟C#事件委托机制(二)
- PHP审计小记
- Android开发常用属性
- canvas导出图片方法总结
- 最近发现docker感觉不错
- SSL、TLS协议格式、HTTPS通信过程、RDP SSL通信过程
- 山东理工大学第七届ACM校赛-学区房问题 分类: 比赛 2015-06-26 10:23 89人阅读 评论(0) 收藏
- Ajax异步操作集合啦(阿贾克斯)
- mysql数据库连接池 手动编写
- ReactiveCocoa 简单使用
- perl 使用SUPER类来访问覆盖的方法
- Go 单例模式[个人翻译]
- 楼梯T-SQL:超越基础6级:使用CASE表达式和IIF函数
- Spring -- <;mvc:annotation-driven />;
- InnoDB和MyISAM的区别
- 845. Greatest Common Divisor
- Linux 删除用户,用户主目录
- maven+eclipse创建web项目
- Hash问题----Hash强碰撞
- SharePoint 使用ECMAscript对象模型来读取帖子列表
热门文章
- TypeError与ValueError的区别
- win10如何进入安全模式的几种方法
- copy the content of a file muliptle times and save as ordered files:
- hadoop datanode usages方差算法
- CODEVS2144 砝码称重2 (哈希表)
- sql中对数值四舍五入取小数点后两位数字
- hdu_1019_Least Common Multiple_201310290920
- P1265 公路修建 洛谷
- MVC.Net 5:允许保存和输出Html内容
- CF #319 div 2 D