Results 1 to 37 of 37

Thread: How can I listen to a sound/music file in VB?

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Nov 2005
    Posts
    287

    How can I listen to a sound/music file in VB?

    Dear Friends,

    How can I listen/open a sound/music file in VB6 by pressing a cmdPLAY button?

    Thanks in advance.

    Regards,

    Margaret.

  2. #2
    Frenzied Member HanneSThEGreaT's Avatar
    Join Date
    Nov 2003
    Location
    Vereeniging, South Africa
    Posts
    1,492

    Re: How can I listen to a sound/music file in VB?

    One option is to use the MCI control
    Attached Files Attached Files
    VB.NET MVP 2008 - Present

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Nov 2005
    Posts
    287

    Re: How can I listen to a sound/music file in VB?

    Quote Originally Posted by HanneSThEGreaT
    One option is to use the MCI control
    Hi,

    Actually what I need is, I would like to record question and answers in .wav files using Windows Sound Recorder. Then, when I open my quiz program and click on play button the
    VB Code:
    1. .wav
    files should start using windows media player.

    How can I do this? What is the code?

    Regards,

    Margaret.

  4. #4
    PowerPoster Keithuk's Avatar
    Join Date
    Jan 2004
    Location
    Staffordshire, England
    Posts
    2,236

    Re: How can I listen to a sound/music file in VB?

    If you want to convert text in a TextBox to a wave file then you need to download Speech SDK 5.1

    Speech SDK 5.1
    Keith

    I've been programming with VB for 25 years. Started with VB4 16bit Pro, VB5 Pro, VB6 Pro/Enterprise and now VB3 Pro. But I'm no expert, I'm still learning.

  5. #5
    Frenzied Member HanneSThEGreaT's Avatar
    Join Date
    Nov 2003
    Location
    Vereeniging, South Africa
    Posts
    1,492
    VB.NET MVP 2008 - Present

  6. #6

    Thread Starter
    Hyperactive Member
    Join Date
    Nov 2005
    Posts
    287

    Re: How can I listen to a sound/music file in VB?

    Quote Originally Posted by HanneSThEGreaT
    ... And here's some nice artciles on how to use the Speech SDK
    I already have some .wav audio files which I recorded using Microsoft Sound Recorder. Just, I need to use them in VB application. I think I need to specify the path of that file and write code to execute the Windows Media Player to play that audio file.

    How to do it?

    Margaret.

  7. #7
    Frenzied Member HanneSThEGreaT's Avatar
    Join Date
    Nov 2003
    Location
    Vereeniging, South Africa
    Posts
    1,492

    Re: How can I listen to a sound/music file in VB?

    The ball game keeps changing...

    have a look at this link :
    http://www.thescarms.com/vbasic/volumecd.asp

    I sincerely hope it helps you now Maragaret
    VB.NET MVP 2008 - Present

  8. #8
    Hyperactive Member Hassan Basri's Avatar
    Join Date
    Sep 2006
    Posts
    324

    Re: How can I listen to a sound/music file in VB?

    VB Code:
    1. Private Declare Function PlaySound& Lib "winmm.dll" _
    2. (ByVal lpszName As String, ByVal hModule As Long, _
    3. ByVal dwFlags As Long)
    4.  
    5. Const SND_ASYNC = &H1
    6. Const MyFile = "c:/WINDOWS/MEDIA/logoff.wav"
    7.  
    8. Private Sub cmdPlay_Click()
    9.  
    10. Call PlaySound(MyFile, 0&, SND_ASYNC)
    11.  
    12. End Sub

  9. #9
    Fanatic Member schoolbusdriver's Avatar
    Join Date
    Jan 2006
    Location
    O'er yonder
    Posts
    1,020

    Re: How can I listen to a sound/music file in VB?

    Quote Originally Posted by HanneSThEGreaT
    The ball game keeps changing...

    And there's more. If you want to compile the sounds into your app, you can put them in a resource file and play them from there

  10. #10
    PowerPoster Keithuk's Avatar
    Join Date
    Jan 2004
    Location
    Staffordshire, England
    Posts
    2,236

    Re: How can I listen to a sound/music file in VB?

    Quote Originally Posted by schoolbusdriver

    And there's more. If you want to compile the sounds into your app, you can put them in a resource file and play them from there
    Yes but she'll need to use different code to do that won't she schoolbusdriver?
    Keith

    I've been programming with VB for 25 years. Started with VB4 16bit Pro, VB5 Pro, VB6 Pro/Enterprise and now VB3 Pro. But I'm no expert, I'm still learning.

  11. #11
    Member
    Join Date
    Oct 2006
    Posts
    46

    Re: How can I listen to a sound/music file in VB?

    And there's more. If you want to compile the sounds into your app, you can put them in a resource file and play them from there
    Yep. Even MP3/WMA:
    http://pscode.com/vb/scripts/ShowCod...67020&lngWId=1

  12. #12

    Thread Starter
    Hyperactive Member
    Join Date
    Nov 2005
    Posts
    287

    Re: How can I listen to a sound/music file in VB?

    Quote Originally Posted by Hassan Basri
    VB Code:
    1. Private Declare Function PlaySound& Lib "winmm.dll" _
    2. (ByVal lpszName As String, ByVal hModule As Long, _
    3. ByVal dwFlags As Long)
    4.  
    5. Const SND_ASYNC = &H1
    6. Const MyFile = "c:/WINDOWS/MEDIA/logoff.wav"
    Hi,

    Where should I write the above code on form?

    Margaret.

  13. #13
    Fanatic Member schoolbusdriver's Avatar
    Join Date
    Jan 2006
    Location
    O'er yonder
    Posts
    1,020

    Re: How can I listen to a sound/music file in VB?

    Quote Originally Posted by Keithuk
    Yes but she'll need to use different code to do that won't she schoolbusdriver?
    Yes

    @ Keith, how about this. Plays from memory BEFORE (and after) compilation. Problems ? - it won't play asynchronously. Crashes if you try to use SND_ASYNC
    VB Code:
    1. Option Explicit
    2.  
    3. 'Pass an ANY Resource reference to lpszName. NOTE:- "ByRef"
    4. Private Declare Function PlaySoundResMem Lib "winmm.dll" Alias "PlaySoundA" _
    5.    (ByRef lpszName As Any, ByVal hModule As Long, ByVal dwFlags As Long) As Long
    6.  
    7. Const SND_MEMORY = &H4 'Use a byte array.
    8. Const SND_SYNC = &H0 'Play synchronously (default)
    9.  
    10. Private Sub Command1_Click() 'PlaySound. Resource file. SYNCHRONOUS ONLY.
    11.    Dim bytResFile() As Byte
    12.    
    13.    bytResFile = LoadResData(101, "SOUND")
    14.    Call PlaySoundResMem(bytResFile(0), App.hInstance, SND_MEMORY Or SND_SYNC)
    15. End Sub

  14. #14

    Thread Starter
    Hyperactive Member
    Join Date
    Nov 2005
    Posts
    287

    Re: How can I listen to a sound/music file in VB?

    Hi, thanks. I am getting the following error.

    Margaret.
    Attached Images Attached Images  

  15. #15
    Member
    Join Date
    Oct 2006
    Posts
    46

    Re: How can I listen to a sound/music file in VB?

    Quote Originally Posted by schoolbusdriver
    Yes

    @ Keith, how about this. Plays from memory BEFORE (and after) compilation. Problems ? - it won't play asynchronously. Crashes if you try to use SND_ASYNC
    VB Code:
    1. Option Explicit
    2.  
    3. 'Pass an ANY Resource reference to lpszName. NOTE:- "ByRef"
    4. Private Declare Function PlaySoundResMem Lib "winmm.dll" Alias "PlaySoundA" _
    5.    (ByRef lpszName As Any, ByVal hModule As Long, ByVal dwFlags As Long) As Long
    6.  
    7. Const SND_MEMORY = &H4 'Use a byte array.
    8. Const SND_SYNC = &H0 'Play synchronously (default)
    9.  
    10. Private Sub Command1_Click() 'PlaySound. Resource file. SYNCHRONOUS ONLY.
    11.    Dim bytResFile() As Byte
    12.    
    13.    bytResFile = LoadResData(101, "SOUND")
    14.    Call PlaySoundResMem(bytResFile(0), App.hInstance, SND_MEMORY Or SND_SYNC)
    15. End Sub
    Of course this crashes when using the SND_ASYNC flag,
    bytResFile must be declared global.
    PlaySound will return immediately, the method will be left,
    and bytResFile will fall out of scope, therefore be freed by the VB Runtime,
    the memory isn't accessible anymore, PlaySound tries to access an
    invalid memory address, Crash.

  16. #16
    Fanatic Member schoolbusdriver's Avatar
    Join Date
    Jan 2006
    Location
    O'er yonder
    Posts
    1,020

    Re: How can I listen to a sound/music file in VB?

    Quote Originally Posted by Arne Elster
    Of course this crashes when using the SND_ASYNC flag,
    bytResFile must be declared global.
    PlaySound will return immediately, the method will be left,
    and bytResFile will fall out of scope, therefore be freed by the VB Runtime,
    the memory isn't accessible anymore, PlaySound tries to access an
    invalid memory address, Crash.
    It DOES work! - thanks. Consider my above code suitably ammended
    Last edited by schoolbusdriver; Nov 8th, 2006 at 08:38 AM.

  17. #17
    Fanatic Member schoolbusdriver's Avatar
    Join Date
    Jan 2006
    Location
    O'er yonder
    Posts
    1,020

    Re: How can I listen to a sound/music file in VB?

    Quote Originally Posted by Margaret
    Hi, thanks. I am getting the following error.

    Margaret.
    You need to add a resource file to your project, and put a .wav file into the resource file. Look in my signature for "Resource file tutorial" - it's pretty good.

    EDIT:You may find post 19 in THIS THREAD useful. (The whole thread shows a few different ways of using the playsound API)
    Last edited by schoolbusdriver; Nov 8th, 2006 at 08:25 AM.

  18. #18

    Thread Starter
    Hyperactive Member
    Join Date
    Nov 2005
    Posts
    287

    Re: How can I listen to a sound/music file in VB?

    Quote Originally Posted by schoolbusdriver
    You need to add a resource file to your project, and put a .wav file into the resource file. Look in my signature for "Resource file tutorial" - it's pretty good.
    I cant find any resource file to add in my project. What to do now?

    Note: I got it. And created a resource file and put a .wav file. Now the program hangs.

    Margaret.
    Attached Images Attached Images  
    Last edited by Margaret; Nov 8th, 2006 at 11:15 AM.

  19. #19
    Fanatic Member schoolbusdriver's Avatar
    Join Date
    Jan 2006
    Location
    O'er yonder
    Posts
    1,020

    Re: How can I listen to a sound/music file in VB?

    That definitely shouldn't happen. Can you zip up your project, including the res file, and attach it to a post please ?

  20. #20

    Thread Starter
    Hyperactive Member
    Join Date
    Nov 2005
    Posts
    287

    Re: How can I listen to a sound/music file in VB?

    Quote Originally Posted by schoolbusdriver
    That definitely shouldn't happen. Can you zip up your project, including the res file, and attach it to a post please ?

    Hi,

    Thanks a lot for your usual help. I have attached the project. But could not attach the Resourse file & Add Questions form due to the limitation of (size is too large to be attached : zip file is 868 KB) attachment.

    Actually what I need for this project is, I have questions and options to select correct answer. All are in text format. Now, I would like to record each question alongwith its options in an audio file giving a name like..Question1.wav, Question2.wav, Question3.wav, ........Question50.wav (.wav or .mp3 file format).

    So, when users start the quiz they can see the question & its options in text and when press button "Play Sound" they can listen to that question & options.

    How can I do this? Hope to get usual help from you.

    Regarding resource file path I have attched .jpg file.

    Regards,

    Margaret
    Attached Images Attached Images  
    Attached Files Attached Files
    Last edited by Margaret; Nov 9th, 2006 at 02:54 AM.

  21. #21
    Fanatic Member schoolbusdriver's Avatar
    Join Date
    Jan 2006
    Location
    O'er yonder
    Posts
    1,020

    Re: How can I listen to a sound/music file in VB?

    Hi Margaret, no probs. The pic and code was enough You need to change the "Type" of resource to "SOUND". In the resource editor, double-click on the "101" and you'll get an "Edit Properties" dialog. Just change the Type to "SOUND". The play code needs to be changed to suit:
    VB Code:
    1. Private Sub cmdPlaySound_Click() 'PlaySound. Resource file. SYNCHRONOUS ONLY.
    2.  
    3.   Dim bytResFile() As Byte
    4.    
    5.    bytResFile = LoadResData(101, "SOUND")
    6.    Call PlaySoundResMem(bytResFile(0), App.hInstance, SND_MEMORY Or SND_SYNC)
    7.  
    8. End Sub
    ("WAVE" also works)

    BTW, this code will cause the app to "freeze" while the sounds are played - which is what I assume you want for a Quiz program ie - stop user interaction until the questions/answers are played. As Arne Elster pointed out above, a minor change can alter this behaviour - the only problem being that the "sound file" stored in "bytResFile()" will remain in memory for the duration of the app. Although it can be erased, there is no easy (one liner) way to do this automatically - although it is possible. A better way is to use code that doesn't involve this overhead - the problem being it will only play sounds after you've made an exe. It won't play in the IDE If you want this alternative, just let me know.

  22. #22

    Thread Starter
    Hyperactive Member
    Join Date
    Nov 2005
    Posts
    287

    Re: How can I listen to a sound/music file in VB?

    Quote Originally Posted by schoolbusdriver
    Hi Margaret, no probs. The pic and code was enough You need to change the "Type" of resource to "SOUND". In the resource editor, double-click on the "101" and you'll get an "Edit Properties" dialog. Just change the Type to "SOUND". The play code needs to be changed to suit:
    VB Code:
    1. Private Sub cmdPlaySound_Click() 'PlaySound. Resource file. SYNCHRONOUS ONLY.
    2.  
    3.   Dim bytResFile() As Byte
    4.    
    5.    bytResFile = LoadResData(101, "SOUND")
    6.    Call PlaySoundResMem(bytResFile(0), App.hInstance, SND_MEMORY Or SND_SYNC)
    7.  
    8. End Sub
    ("WAVE" also works)
    The audio file name is "Welcome.wav". I put this file in Resource Folder. I am still confused since it doesn't play the sound.

    Margaret.

  23. #23
    Fanatic Member schoolbusdriver's Avatar
    Join Date
    Jan 2006
    Location
    O'er yonder
    Posts
    1,020

    Re: How can I listen to a sound/music file in VB?

    Try the project in this zip file. Very, very rarely, PlaySound fails on some PCs. Let me know if it works OK.
    EDIT: Attachment removed. See later post.
    Last edited by schoolbusdriver; Nov 13th, 2006 at 03:03 PM.

  24. #24
    PowerPoster Keithuk's Avatar
    Join Date
    Jan 2004
    Location
    Staffordshire, England
    Posts
    2,236

    Re: How can I listen to a sound/music file in VB?

    Quote Originally Posted by Margaret
    The audio file name is "Welcome.wav". I put this file in Resource Folder. I am still confused since it doesn't play the sound.
    Providing you have Type right = "SOUND" and the ID is a number you may have problems hearing the sound in IDE. Compile the exe and try it again.

    schoolbusdriver gave me different code to play wave files and I had to compile before I could hear a sound.
    Keith

    I've been programming with VB for 25 years. Started with VB4 16bit Pro, VB5 Pro, VB6 Pro/Enterprise and now VB3 Pro. But I'm no expert, I'm still learning.

  25. #25

    Thread Starter
    Hyperactive Member
    Join Date
    Nov 2005
    Posts
    287

    Re: How can I listen to a sound/music file in VB?

    Quote Originally Posted by Keithuk
    Providing you have Type right = "SOUND" and the ID is a number you may have problems hearing the sound in IDE. Compile the exe and try it again.

    schoolbusdriver gave me different code to play wave files and I had to compile before I could hear a sound.
    Hi,

    Still, I am confused. Suppose I have 10 audio files in a folder "Audio Songs" say, Song1, Song2, Song3 ......Song10, and the folder is in the same project folder. How can I listen to a song Song1 when I click on cmdSong1.

    Kindly let me know the easiest way to do this, please.

    Margaret.

  26. #26
    PowerPoster Keithuk's Avatar
    Join Date
    Jan 2004
    Location
    Staffordshire, England
    Posts
    2,236

    Re: How can I listen to a sound/music file in VB?

    When you add these songs to a resource file I normally use the filename without the extension. Because that is easy to play that sound. But if you are using schoolbusdriver code with PlaySound API you need to change this to a number so write them down.

    Song1 = 101
    Song2 = 102
    Song3 = 103
    Song4 = 104 etc

    Without seeing the code you are using I can only guess at how you are playing these sounds.
    VB Code:
    1. Const SND_ASYNC = &H1         'Play asynchronously.
    2. Const SND_PURGE = &H40        'Release memory.
    3. Const SND_RESOURCE = &H40004  'Name is a resource name or atom.
    4.  
    5. Private Declare Function PlaySound Lib "winmm.dll" Alias _
    6. "PlaySoundA" (ByVal lpszName As Long, ByVal hModule As Long,_
    7. ByVal dwFlags As Long) As Long
    8.  
    9. Private Sub PlaySounds(SoundNum As Long)
    10.  
    11. Dim SoundBuffer As String
    12.    
    13. SoundBuffer = StrConv(LoadResData(SoundNum, "SOUND"), vbUnicode)
    14. 'Reference nothing and purge memory.
    15. Call PlaySound(0, App.hInstance, SND_PURGE)
    16. 'Reference the res file.
    17. Call PlaySound(SoundBuffer, App.hInstance, SND_RESOURCE Or SND_ASYNC)
    18.  
    19. End Sub
    20.  
    21. Private Sub cmdSong1_Click()
    22.  
    23. Call PlaySounds(101)
    24.  
    25. End Sub
    Are your sound types "SOUND"?
    Last edited by Keithuk; Nov 11th, 2006 at 06:07 PM.
    Keith

    I've been programming with VB for 25 years. Started with VB4 16bit Pro, VB5 Pro, VB6 Pro/Enterprise and now VB3 Pro. But I'm no expert, I'm still learning.

  27. #27

    Thread Starter
    Hyperactive Member
    Join Date
    Nov 2005
    Posts
    287

    Re: How can I listen to a sound/music file in VB?

    Quote Originally Posted by Keithuk
    Without seeing the code you are using I can only guess at how you are playing these sounds.
    VB Code:
    1. Const SND_ASYNC = &H1         'Play asynchronously.
    2. Const SND_PURGE = &H40        'Release memory.
    3. Const SND_RESOURCE = &H40004  'Name is a resource name or atom.
    Hi,

    I have attached the jpg file to show how I have done the coding. Though there are no errors, I cound not hear any audio.

    Hope to get help from you.

    Margaret.
    Attached Images Attached Images  

  28. #28
    PowerPoster Keithuk's Avatar
    Join Date
    Jan 2004
    Location
    Staffordshire, England
    Posts
    2,236

    Re: How can I listen to a sound/music file in VB?

    Well have I said before I can't hear any sounds using PlaySound API on my comp you have to compile the exe first then run the exe.
    Keith

    I've been programming with VB for 25 years. Started with VB4 16bit Pro, VB5 Pro, VB6 Pro/Enterprise and now VB3 Pro. But I'm no expert, I'm still learning.

  29. #29

    Thread Starter
    Hyperactive Member
    Join Date
    Nov 2005
    Posts
    287

    Re: How can I listen to a sound/music file in VB?

    Quote Originally Posted by Keithuk
    Well have I said before I can't hear any sounds using PlaySound API on my comp you have to compile the exe first then run the exe.
    Hi,

    I am getting the following attached error while compiling the exe.

    Margaret.
    Attached Images Attached Images  

  30. #30
    Fanatic Member schoolbusdriver's Avatar
    Join Date
    Jan 2006
    Location
    O'er yonder
    Posts
    1,020

    Re: How can I listen to a sound/music file in VB?

    You need to add the API declaration and constants to the top of the form frmQuiz1's code - just under "Option Explicit"

    Code:
    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
    
    Const SND_ASYNC = &H1 'Play asynchronously.
    Const SND_PURGE = &H40 'Release memory.
    Const SND_RESOURCE = &H40004 'Name is a resource name or atom.
    
    
    Dim Marks As Double
    
    Private Sub Form_Load()
    'etc, etc........
    As KeithUK pointed out, this doesn't work on his PC, but works on others. There are at least 5 different ways of calling PlaySound, some of which may not work unless the program is compiled, and others may not work on YOUR PC, but work on other PCs.

    Did you try the project in the zip file "Sounds.zip" I attached to post 23 ? Did it work OK ?

  31. #31

    Thread Starter
    Hyperactive Member
    Join Date
    Nov 2005
    Posts
    287

    Re: How can I listen to a sound/music file in VB?

    Quote Originally Posted by schoolbusdriver
    Did you try the project in the zip file "Sounds.zip" I attached to post 23 ? Did it work OK ?
    Hi, it is nice to see you online. I tried both. But coud not get the sound. I can hear just a sound like some error beep sound.

    Margaret.

  32. #32
    PowerPoster Keithuk's Avatar
    Join Date
    Jan 2004
    Location
    Staffordshire, England
    Posts
    2,236

    Re: How can I listen to a sound/music file in VB?

    Quote Originally Posted by Margaret
    But coud not get the sound. I can hear just a sound like some error beep sound.

    Margaret.
    I'll say this a third time Margaret. I can't hear any sounds when I use PlaySound API you have to compile the exe first.

    Does your computer play sounds anyway through Windows Media Player?

    You can check if you comp can play anything with the waveOutGetNumDevs API.
    VB Code:
    1. Private Declare Function waveOutGetNumDevs Lib "winmm.dll" () As Long
    2.  
    3. Private Sub Form_Load()
    4.  
    5. Dim rtn As Long
    6.  
    7. rtn = waveOutGetNumDevs()
    8.  
    9. If rtn = 0 Then
    10.     MsgBox "Your system cannot play Sound Files.", 16, "SoundCard Check"
    11. End If
    Keith

    I've been programming with VB for 25 years. Started with VB4 16bit Pro, VB5 Pro, VB6 Pro/Enterprise and now VB3 Pro. But I'm no expert, I'm still learning.

  33. #33
    "Digital Revolution"
    Join Date
    Mar 2005
    Posts
    4,471

    Re: How can I listen to a sound/music file in VB?

    I've had this problem before with playing sounds from resource files. I would hear a beep until I compiled, ran the EXE, and then ran the project again from the IDE.

    But I'm guessing you probably already tried this...

    Edit: Just saw Keith's post.

  34. #34

    Thread Starter
    Hyperactive Member
    Join Date
    Nov 2005
    Posts
    287

    Re: How can I listen to a sound/music file in VB?

    Quote Originally Posted by DigiRev
    I've had this problem before with playing sounds from resource files. I would hear a beep until I compiled, ran the EXE, and then ran the project again from the IDE.

    But I'm guessing you probably already tried this...

    Edit: Just saw Keith's post.
    Yes, I am also having the same problem. My computer plays sounds very well. So, the sound card is ok. Any other possible way to play audio files which are stored in my project folder.

    Hope to get some help.

    Margaret.

  35. #35
    Fanatic Member schoolbusdriver's Avatar
    Join Date
    Jan 2006
    Location
    O'er yonder
    Posts
    1,020

    Re: How can I listen to a sound/music file in VB?

    I've put together a little project that uses several variations of the PlaySound APIs. Unzip both files into the same folder and run the project in the IDE, then try compiling it and running the executable. Do any of them work, and if so, which ?
    Attached Files Attached Files

  36. #36

    Thread Starter
    Hyperactive Member
    Join Date
    Nov 2005
    Posts
    287

    Re: How can I listen to a sound/music file in VB?

    Quote Originally Posted by schoolbusdriver
    I've put together a little project that uses several variations of the PlaySound APIs. Unzip both files into the same folder and run the project in the IDE, then try compiling it and running the executable. Do any of them work, and if so, which ?
    Hi,

    No, everytime I play either there is just a beep sound or system hangs.

    Regards,

    Margaret.

  37. #37
    Fanatic Member schoolbusdriver's Avatar
    Join Date
    Jan 2006
    Location
    O'er yonder
    Posts
    1,020

    Re: How can I listen to a sound/music file in VB?

    Well, that answers one question - it looks like your PC has similar problems as DigiRev's and Keithuk's when trying to use the PlaySound APIs. I haven't got any idea what causes it. There are the alternatives such as those mentioned in earlier posts. Also, in my signature - VB - mciSendString - audio/video playback / video splashscreen etc from resource file. Although this is mainly intended as a splashscreen, it can easily be adapted to simply play sounds from a resource file - the form doesn't have to be visible.

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