Results 1 to 2 of 2

Thread: error sounds

  1. #1

    Thread Starter
    New Member
    Join Date
    Nov 2000
    Posts
    15
    Just a dumb question. If I have an error, how can I play a sound on the sound card, to signify and error had been made.

    Thanks in advance,

    Andrew

  2. #2
    Guest
    Code:
    Private Declare Function PlaySound Lib "winmm.dll" _
    Alias "PlaySoundA" (ByVal lpszName As String, ByVal hModule _
    As Long, ByVal dwFlags As Long) As Long
    
    
    Private Sub Command1_Click()
        
        On Error GoTo Err
        Error 1 'generate error
        Exit Sub
    Err:
        PlaySound "MyWav.wav", 0&, &H1
        MsgBox "Error!", vbCritical
        
    End Sub

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width