Results 1 to 2 of 2

Thread: play .wav file

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2002
    Posts
    1

    play .wav file

    hi all,
    please tell how can we play a wav file from a database in VB
    i have number of fields in my database including audio. i want that when i press the next button the wav file should automatically jump to next record.

    quick please!!
    Anuj Kapoor

  2. #2
    Bouncy Member darre1's Avatar
    Join Date
    May 2001
    Location
    Peterborough, UK
    Posts
    3,828
    VB Code:
    1. Private Const SND_ASYNC = &H1           'play asynchronously
    2. Private Const SND_FILENAME = &H20000    'name is a file name
    3. Private Declare Function PlaySound Lib "winmm.dll" Alias "PlaySoundA" (ByVal lpszName As String, ByVal hModule As Long, ByVal dwFlags As Long) As Long
    4.  
    5. Private Sub Form_Load()
    6.     PlaySound "[i]FILE.WAV[/i]", ByVal 0&, SND_FILENAME Or SND_ASYNC
    7. End Sub

    there's an example

    Confucious say, "Man standing naked in biscuit barrel not necessarily ****ing crackers."

    Don't forget to format your code in your posts

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