Results 1 to 4 of 4

Thread: Sounds in VB

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Aug 2000
    Location
    I'm right here!
    Posts
    849
    How can I play mp3 and wav files in VB?
    If someone can give a complete code, I'de will be
    very thankful.
    Dekel C.

  2. #2
    Frenzied Member mlewis's Avatar
    Join Date
    Sep 2000
    Posts
    1,226
    You can find code for doing that and more at this link:

    http://209.207.250.147/showthread.php?threadid=31987

    Hope that helps.
    M. Lewis
    Pi-Q Software
    How many mouse clicks does it take to cook breakfast?

    Blargh! I am dead!

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Aug 2000
    Location
    I'm right here!
    Posts
    849
    OK, but what about WAV?
    Dekel C.

  4. #4
    _______ HeSaidJoe's Avatar
    Join Date
    Jun 1999
    Location
    Canada
    Posts
    3,946

    <?>

    Code:
    'Play A sound
    
    '
    'API Function to play the sound
    'bas module code
    
    Declare Function PlaySound Lib "winmm.dll" _
    Alias "PlaySoundA" (ByVal lpszName As String, _
    ByVal hModule As Long, ByVal dwFlags As Long) As Long 
    
    
    'form code
    
    Private Sub Command1_Click()
        'Play wav
        PlaySound "C:\A Wayne\YourFile.wav", 0&, &H1
    End Sub
    
    Private Sub Command2_Click()
        'Stop wav
        PlaySound "C:\A Wayne\YourFile.wav", 0&, &H4
    End Sub
    "A myth is not the succession of individual images,
    but an integerated meaningful entity,
    reflecting a distinct aspect of the real world."

    ___ Adolf Jensen

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