Hi, I would like to know how can I make the system beep louder I know you can change the frequency of the beep but its not loud enough as I am using it in a noisy environment. How can I sound the loudest system beep or make the system buzzer louder?? Also I would like to find out that how can I display a MsgBox as well as beep? I am using VB6. Thanks in advance!

Recommended Answers

All 3 Replies

You will need to change the volume via the volume control through the system and you can do that via VB6 by starting off with the mixerSetControlDetails API. You can look this up in the VB help files and at the bottom of the page take a look at Audio Mixer Functions as you will need other API's to open/retrieve a handle to the mixer.

Good Luck

Hi, Thanks for your reply I tried it but it only increase the speaker volume! is there a way to increase the system volume? and please tell me how can I display a MsgBox and Beep at the same time? Thanks

If you open up Volume Control and play with this example program...

http://www.thescarms.com/VBasic/volumecd.aspx

you will see it adjusts the volume contol which is the system sound and not just the speaker volume control. However, if user right clicks on the volume control and clicks mute no matter what you do there will be no sound.

Now as for making a beep and a message box appear, this is once again dependant upon if the user has done one of two things. Have they disabled sound by click on the mute box? Have they gone to system sounds and set their system sounds to none? Because the standard vb msgbox should cause a sound when it displays but if the sound is muted or if the user has set their system sounds schemes to none, then you will not hear a beep.

To set system mute see these examples...

http://www.experts-exchange.com/Programming/Languages/Visual_Basic/Q_10167931.html

Now you have the information to make sure the system sound is not muted, and you can set the volume of the system (and others if you explore enough). Now to get around the user not having a sound scheme see this...

http://www.codeproject.com/KB/audio-video/soundalerts.aspx

or as the auther advises you can use sndPlaySound asynchronously right before you display your message box

Good Luck

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.