Results 1 to 6 of 6

Thread: 'h' - 'e'- on hockey stick - and a 'p'

  1. #1

    Thread Starter
    Hyperactive Member Sacofjoea's Avatar
    Join Date
    May 2000
    Location
    Never Never Land
    Posts
    472
    WHen I use this to play a .wav it stops the actions in the form, how could I make the .wav play, and still have the stuff in the form move?

    Option Explicit

    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_FILENAME = &H20000 ' name is a file name
    Private Const SND_ASYNC = &H1 ' play asynchronously
    Private Const SND_SYNC = &H0


    Private Sub Play_Sound_Click()
    PlaySound App.Path & "\ILOVEYOUVIRUS.wav.vbs.mp3.wav.vbs.jpg.wav", 0, SND_SYNC
    End Sub

  2. #2
    Addicted Member
    Join Date
    Mar 2000
    Location
    Gainesville, FL
    Posts
    131
    Play it ASYNC instead of SYNC

  3. #3

    Thread Starter
    Hyperactive Member Sacofjoea's Avatar
    Join Date
    May 2000
    Location
    Never Never Land
    Posts
    472
    Thanks a lot! One more thing... what code can I use to make the sound stop when the command button function is pressed?
    That arranged can be

  4. #4

    Thread Starter
    Hyperactive Member Sacofjoea's Avatar
    Join Date
    May 2000
    Location
    Never Never Land
    Posts
    472
    Im still interested in stopping it whenever they hit ok...
    That arranged can be

  5. #5
    Guest
    To stop playing a WAV:

    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_PURGE = &H40
    
    
    Private Sub cmdPlay_Click()
    
        'Play the WAV file
        PlaySound "C:\MyWav.wav", 0, SND_ASYNC
    
    End Sub
    
    Private Sub cmdStop_Click()
    
        'Stop the WAV file
        PlaySound "", 0, SND_PURGE
    
    End Sub

  6. #6

    Thread Starter
    Hyperactive Member Sacofjoea's Avatar
    Join Date
    May 2000
    Location
    Never Never Land
    Posts
    472

    Talking

    Thanks Guru
    That arranged can be

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