吾爱破解 - 52pojie.cn

 找回密码
 注册[Register]

QQ登录

只需一步,快速开始

查看: 3683|回复: 1
收起左侧

[其他转载] 将音量降低到最无

 关闭 [复制链接]
mengl520 发表于 2011-9-13 00:05
Option Explicit
'==========================================================================================
'//功能:将音量降低到最无
'//用法:Call KillSound
'SendMessage 1000, WM_APPCOMMAND, &H30292, APPCOMMAND_VOLUME_UP * &H10000  音量增加
'SendMessage 1000, WM_APPCOMMAND, &H30292, APPCOMMAND_VOLUME_DOWN * &H10000  音量减少
'SendMessage 1000, WM_APPCOMMAND, &H200EB0, APPCOMMAND_VOLUME_MUTE * &H10000  静音
'==========================================================================================
Private Declare Function SendMessage Lib "user32.dll" Alias "SendMessageA" ( _
     ByVal hwnd As Long, _
     ByVal wMsg As Long, _
     ByVal wParam As Long, _
     ByVal lParam As Long) As Long
Private Const WM_APPCOMMAND As Long = &H319
Private Const APPCOMMAND_VOLUME_UP As Long = 10
Private Const APPCOMMAND_VOLUME_DOWN As Long = 9
Private Const APPCOMMAND_VOLUME_MUTE As Long = 8
Public Sub KillSound()
    Dim i As Integer
    '降低到最小
    For i = 1 To 100
        SendMessage 1000, WM_APPCOMMAND, &H30292, APPCOMMAND_VOLUME_DOWN * &H10000
    Next i
    '静音
    SendMessage 1000, WM_APPCOMMAND, &H200EB0, APPCOMMAND_VOLUME_MUTE * &H10000
End Sub

发帖前要善用论坛搜索功能,那里可能会有你要找的答案或者已经有人发布过相同内容了,请勿重复发帖。

xiaowan774 发表于 2011-12-3 00:15
好贴啊1学习中
您需要登录后才可以回帖 登录 | 注册[Register]

本版积分规则

返回列表

RSS订阅|小黑屋|处罚记录|联系我们|吾爱破解 - LCG - LSG ( 京ICP备16042023号 | 京公网安备 11010502030087号 )

GMT+8, 2025-1-10 10:14

Powered by Discuz!

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表