Results 1 to 2 of 2

Thread: changeing the volume

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2000
    Location
    Texas
    Posts
    313

    Question

    How can i change the volume or get the volume, or mute it ect.

  2. #2
    Guest
    Try this.
    Code:
    Private Declare Function waveOutSetVolume Lib "winmm.dll" (ByVal uDeviceID As Long, ByVal dwVolume As Long) As Long
    Private Declare Function waveOutGetVolume Lib "winmm.dll" (ByVal uDeviceID As Long, lpdwVolume As Long) As Long
    
    Function GetVolume(id As Long) As Variant
        Retval = waveOutGetVolume(1, volume)
        volume = volume And &HFFFF
        volume = Hex(volume)
        GetVolume = volume
    End Function
    
    Function SetVolume(id As Long, vol As Long) As Variant
        Retval = waveOutSetVolume(id, vol)
    End Function
    
    Private Sub Command1_Click()
        'Set the volume to max
        SetVolume 1, &HFFFF
    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