delphi 调节音量代码


本文整理自网络,侵删。

 
unit UnitVolumeWin7;

interface

uses messages, Windows, Forms;

/// <summary>
/// 增大音量
/// </summary>
procedure VolumeUp;
/// <summary>
/// 减小音量
/// </summary>
procedure VolumeDown;
/// <summary>
/// 切换静音
/// </summary>
procedure VolumeMute;

implementation

procedure VolumeUp;
begin
  SendMessage(Application.Handle, WM_APPCOMMAND, $30292, APPCOMMAND_VOLUME_UP * $10000);
end;

procedure VolumeDown;
begin
  SendMessage(Application.Handle, WM_APPCOMMAND, $30292, APPCOMMAND_VOLUME_DOWN * $10000);
end;

procedure VolumeMute;
begin
  SendMessage(Application.Handle, WM_APPCOMMAND, $200EB0, APPCOMMAND_VOLUME_MUTE * $10000);
end;

end.

相关阅读 >>

pos、ansipos、fillchar在Delphi2010中unicode的问题

Delphi 如何获取进程的全路径名

Delphi 调出windows 系统时间设置对话框

Delphi 删除cookies文件

Delphi xe开发 android 开机自动启动

Delphi 10.4.1 edgebrowser 模拟操作网页方法

Delphi 读取流 image1 stream 加载到image2 timage 对象

Delphi tcolortohex 与 hextotcolor

Delphi 通过注册表获取系统版本和cpu型号

Delphi 数字转换成中文

更多相关阅读请进入《Delphi》频道 >>



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...