Can I change the default beep sound?

I am using VB4/32 and want to change the default beep sound.
I tried using the API reference, but all the beeps still sound the same.

Thanks,
Don
derossAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

rantanenCommented:
You use MessageBeep API as follows (VB5/Win95):

Put following declarations in a forms general section

Private Declare Function MessageBeep Lib "user32" (ByVal wType As Long) As Long
Const MB_OK = &H0&
Const MB_ICONASTERISK = &H40&
Const MB_ICONEXCLAMATION = &H30&
Const MB_ICONHAND = &H10&
Const MB_ICONQUESTION = &H20&
Const INTERNAL_SPEAKER = -1

and add implied controls and following code

Private Sub Command1_Click()
    Dim lResult As Long
   
    Select Case List1.List(List1.ListIndex)
        Case "MB_OK"
            lResult = MessageBeep(MB_OK)
        Case "MB_ICONASTERISK"
            lResult = MessageBeep(MB_ICONASTERISK)
        Case "MB_ICONEXCLAMATION"
            lResult = MessageBeep(MB_ICONEXCLAMATION)
        Case "MB_ICONHAND"
            lResult = MessageBeep(MB_ICONHAND)
        Case "MB_ICONQUESTION"
            lResult = MessageBeep(MB_ICONQUESTION)
        Case "INTERNAL_SPEAKER"
            lResult = MessageBeep(INTERNAL_SPEAKER)
    End Select
End Sub

Private Sub Form_Load()
    List1.AddItem "MB_OK"
    List1.AddItem "MB_ICONASTERISK"
    List1.AddItem "MB_ICONEXCLAMATION"
    List1.AddItem "MB_ICONHAND"
    List1.AddItem "MB_ICONQUESTION"
    List1.AddItem "INTERNAL_SPEAKER"
End Sub

0
rantanenCommented:
Or did you mean how to change the .wav file assigned as system default sound? If that's the case then I'm sorry I misunderstood your question. I thought you meant how to use MessageBeep API call.
0
derossAuthor Commented:
Hi rantanen,

I have tried the above suggestion but I still get the same sounding beep for whatever I chose from the list.
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

rantanenCommented:
Do you have a soundcard installed?
0
derossAuthor Commented:
Yes, I have a SoundBlaster Pro.

0
rantanenCommented:
Then in Control Panel -> Sounds, do you have different WAV files assigned to different events? If not, do some changes there.
0
derossAuthor Commented:
I'm sorry if I mislead you, but I am creating this program for someone who does not have a sound card installed and I want to generate different sounding beeps through their internal speaker.
0
MikeP090797Commented:
This isn't possible under Win95 directly. Microsoft has removed the sound APIs from Win32, and if you want to call them, you must build a separate program in 16bit VB, and use it as a DDE server from your program
0
rantanenCommented:
Sorry that I forgot to get back to you :-(

There is a way to do it. Check out following MS KB article:

How to Install and Use the PC Speaker Driver with Windows 95

Last reviewed: May 1, 1997
Article ID: Q138857 95 WINDOWS kbmm

Following are two excrepts from this article:

"SUMMARY

Speak.exe contains a Microsoft Windows sound driver that allows most .wav files to be played on the PC speaker on most computers not equipped with a sound card. This article describes how to obtain, install, and use the PC speaker driver with Microsoft Windows 95. "

" Internet (anonymous FTP)

      ftp ftp.microsoft.com
      Change to the Softlib/Mslfiles folder.
      Get SPEAK.EXE (size: 22312 bytes) "

Of course the drawback (as far as I know) is that you can play only WAV files, but anyway - you can get "similar " sounds connected to different events as in a computer with sound card.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.