Windows 10 Volume Controls

douglasw782

New Member
Joined
Jun 7, 2016
I have an issue that I hope someone can shed some light on, for me. I am creating a windows form application that I want to have backround music and sound effects incorporated into the program. I have the background music in my program, already, but, I want to add two sliders. I need the first slider to be able to turn the music volume up and down and have a checkbox toggle the music on and Off. I need the second to have the same function for the sound effects. I also need these to be operated by the program's user. If anyone could give me instructions on how to achieve this, it would be greatly appreciated.


Sent from my iPad using Tapatalk
 
It would help to know what language you are using and if it's a .Net language which framework. Also what are you using to play music?
 
I'm using C#. To play the music, I used sound player. As for a framework, could you possibly tell me how to find that information? I'm using Visual Studio 2015, and I'm rather new to the program.


Sent from my iPad using Tapatalk
 
It will be under Project > <Projectname> Properties

So if you are using SoundPlayer you would just need to check to see if your checkbox is checked or not, if it's muted then you don't do anything and if it not muted you play your sound. Same thing for music, but you will want a MusicMuted_CheckBox that handles the music checkbox checked_change event and then start or stop the music accordingly.
 
Back
Top Bottom