vb 控制系统音量

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 Sub Command1_Click()
'音量增大
'SendMessage hwnd, 793, 197266, 655360
'
''音量减小
SendMessage hwnd, 793, 197266, 589824

'静音
'SendMessage hwnd, 793, 2100912, 524288
End Sub

你可能感兴趣的:(VB6.0)