Results 1 to 4 of 4

Thread: ***---Simplest way of playing audio on a form---***

  1. #1

    Thread Starter
    Lively Member mykg4orce's Avatar
    Join Date
    Oct 2000
    Location
    CANADA
    Posts
    92
    i need to find a Simple way of playing audio on a form, how can this be done.......please help...i'll be playing a .wav file which will be very short like saying the word "help". thanks

  2. #2
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    Do a search on this forum for "PlaySound", it's been answered many times before
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  3. #3

    Thread Starter
    Lively Member mykg4orce's Avatar
    Join Date
    Oct 2000
    Location
    CANADA
    Posts
    92
    you the man!

  4. #4
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649
    Use the PlaySound API function.
    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 Const SND_ASYNC = &H1         
    Private Const SND_FILENAME = &H20000     
    
    Public Sub PlayItSam(FileName As String)
        PlaySound FileName, 0, SND_ASYNC + SND_FILENAME
    End Sub
    
    Public Sub StopThatNoice()
        PlaySound vbNullString, 0, SND_ASYNC
    End Sub
    Best regards

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