Results 1 to 2 of 2

Thread: Windows sound

  1. #1
    DaoK
    Guest

    Windows sound

    I am sure than is possible to change the sound without having the big sound panel ( see screenshot below). Like, I just want to make a scroll bar and change it in my app or something like that.

    Attached Images Attached Images  

  2. #2
    PowerPoster
    Join Date
    Jul 1999
    Posts
    5,923
    This will change the WAVE output volume if that's any good.

    Requires a textbox. Pu a value in it between 0 and 65535, and click the button. Should be easy to modify into a slider.
    VB Code:
    1. Private Declare Function waveOutSetVolume Lib "Winmm" (ByVal wDeviceID As Integer, ByVal dwVolume As Long) As Integer
    2.  
    3. Private Sub Command1_Click()
    4.  
    5. Dim a, i As Long
    6. Dim tmp, vol As String
    7. vol = Text1
    8. tmp = Right((Hex$(vol + 65536)), 4)
    9. vol = CLng("&H" & tmp & tmp)
    10. a = waveOutSetVolume(0, vol)
    11.  
    12. End Sub

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width