开发者

how to decrease my volume using vb6

开发者 https://www.devze.com 2023-01-06 13:56 出处:网络
how to decrease my volume 开发者_JAVA百科using vb6?Try with something like this: Private Declare Function waveOutSetVolumeLib \"Winmm\" (ByVal wDeviceID As Integer, ByVal dwVolume As Long) As Integer

how to decrease my volume 开发者_JAVA百科using vb6?


Try with something like this:

Private Declare Function waveOutSetVolume  Lib "Winmm" (ByVal wDeviceID As Integer, ByVal dwVolume As Long) As Integer
Private Declare Function waveOutGetVolume Lib "Winmm" (ByVal wDeviceID As Integer, dwVolume As Long) As Integer

Private Sub Command1_Click()
  Dim a, i As Long
  Dim tmp As String
  a = waveOutGetVolume(0, i)
  tmp = "&h" & Right(Hex$(i), 4)
  Text1 = CLng(tmp)
End Sub

Private Sub Command2_Click()
  Dim a, i As Long
  Dim tmp, vol As String
  vol = Text1
  tmp = Right((Hex$(vol + 65536)), 4)
  vol = CLng("&H" & tmp & tmp)
  a = waveOutSetVolume(0, vol)
End Sub
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号