HelpAdding a program to volume mixer.

Posts 1–5 of 5 · Page 1 of 1
Adding a program to volume mixer.
I made a global sound clicker, so whenever you click the mouse it makes a sound. My issue is, I would like to get it to add to the volume mixer. This way you can control volume of the click sound. Any help would be appreciated.
Every program that makes noise is in the volume mixer .
^This. Starting with Windows 7, you can see and change the volume of almost all applications. So, I don't see a point of doing this.

However if you still wanted to do this, use something like this:
Code:
Imports WMPLib
Public Class Form1
    Dim sound As New WindowsMediaPlayer
    Private Sub Click(sender As System.Object, e As System.EventArgs) Handles Your_Event
        sound.settings.volume = (val1 / val2) * 100
        sound.URL = "path to file"
    End Sub
End Class
Also, ALWAYS create the WMP code-wise because if you add it in the designer (or at run-time as a control on the form) it WILL load the users plugins, and that's not good for slow computers, or for AlienFX where it hooks into the keyboard.
I would like to thank you guys for your help, but I'm not using windows media player code.

Here is a sample
Code:
Public Class Form1
    Private WithEvents MouseDetector As MouseDetector

    Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        MouseDetector = New MouseDetector
    End Sub

    Private Sub Form1_Disposed(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Disposed
        RemoveHandler MouseDetector.MouseLeftButtonDownClick, AddressOf MouseDetector_MouseLeftButtonDownClick
        RemoveHandler MouseDetector.MouseRightButtonUpClick, AddressOf MouseDetector_MouseRightButtonUpClick
        MouseDetector.Dispose()
    End Sub

    Private Sub MouseDetector_MouseLeftButtonDownClick(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles MouseDetector.MouseLeftButtonDownClick
        If CheckBox3.Checked = True Then
            My.Computer.Audio.Play(My.Resources.ClickDown, AudioPlayMode.Background)
        ElseIf CheckBox4.Checked = True Then
            My.Computer.Audio.Play(My.Resources.ClickUp, AudioPlayMode.Background)
        End If
    End Sub
And I thought everything that made sound showed up in the volume mixer, but this doesn't.

Oh, and the point of doing this is so I can control the volume.
Posts 1–5 of 5 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?