how to decrease my volume using vb6?
+2
A:
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
Jonathan
2010-07-11 08:53:55
wow wow wow it works ...great a big thanx
subanki
2010-07-11 08:58:31
+1 just for being able to figure out what the asker wanted!
Frank Shearar
2010-07-11 12:21:07