(30) Set system sound volume (API)

I need to know how to raise and lower the main/system sound volume using a Windows API >>NOT AN ACTIVEX CONTROL<<.  I need a bit of sample code on how to do it utilizing the standard VScrollBar control.  

Thanks,

HATCHET
LVL 3
HATCHETAsked:
Who is Participating?
 
MaquiaveloConnect With a Mentor Commented:
 Best if U look here: it's exactly what U R lookinf 4!!

http://www.thescarms.com/

  choose Visual Basic and look for the sample names:

Play Wave Files and Adjust Their Volume Open and Close the CD Tray (till 7/10/99 was the last in the list)

  Good luck!

0
 
MaquiaveloCommented:
 Take a look at http://www.acky.net/vb/vbmisc/index5.sht,
samples #101, #102 & #103.

 
0
 
HATCHETAuthor Commented:
Maquiavelo,

The example that was given at the following URL had code to control the system's volume:

http://www.thescarms.com/VBasic/VolumeCD.htm

I was able to stip it out of all the rest of the crap in that sample and use it.  It works well.  The rest of the example he used is overly complex and is problematic with locking up the sound of your system.  I wouldn't recommend using the code for playing sound files... just the volume control part.

Thanks for the help.

HATCHET
0
 
MaquiaveloCommented:
 Sorry for the complexity, but just looked if it had sample code that could be suitable for your needs. I'm happy it serve you well.
0
All Courses

From novice to tech pro — start learning today.