Results 1 to 3 of 3

Thread: Playing WAV Files

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2000
    Posts
    3

    Post

    After clicking on a command button - how would I play a wave file thats saved as:

    C:\program files\napster\music1.wav

    Thanks!!

    ~john

  2. #2
    Lively Member
    Join Date
    May 1999
    Location
    Orange County
    Posts
    68

    Post

    Declare Function sndPlaySound Lib "WINMM.DLL" Alias "sndPlaySoundA" _
    (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long

    Const SND_SYNC = &H0
    Const SND_ASYNC = &H1
    Const SND_NODEFAULT = &H2
    Const SND_LOOP = &H8
    Const SND_NOSTOP = &H10

    Public Function soundplay()
    SoundName$ = "c:\program files\napster\music.wav"
    wFlags% = SND_ASYNC Or SND_NODEFAULT
    X% = sndPlaySound(SoundName$, wFlags%)
    End Function
    'then make a command button
    'and add this code
    Module1.soundPlay

  3. #3
    Lively Member
    Join Date
    May 1999
    Location
    Orange County
    Posts
    68

    Post

    put all the code in a module except the commmand button code, sorry

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