home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / os / mswindo / programm / tools / 539 < prev    next >
Encoding:
Text File  |  1992-07-21  |  1.3 KB  |  38 lines

  1. Newsgroups: comp.os.ms-windows.programmer.tools
  2. Path: sparky!uunet!brunix!brunix!sp
  3. From: sp@cs.brown.edu (Seth Padowitz)
  4. Subject: Re: VB and sound
  5. Message-ID: <1992Jul21.223156.21625@cs.brown.edu>
  6. Sender: news@cs.brown.edu
  7. Organization: Brown University Department of Computer Science
  8. References: <1992Jul21.131332.28797@jarvis.csri.toronto.edu>
  9. Date: Tue, 21 Jul 1992 22:31:56 GMT
  10. Lines: 26
  11.  
  12. If you have Windows 3.1, then you can use the sndPlaySound() API
  13. from VB to play sounds through your soundblaster.
  14. Alternatively, you can use the Media Control Interface (MCI)
  15. Custom Control included in the VB Professional Toolkit to play
  16. sounds.
  17.  
  18. sndPlaySound() is defined in C as:
  19. BOOL sndPlaySound(LPCSTR lpszSoundName, UINT wFlags);
  20. lpszSoundName is the name of the sound (.WAV) file.
  21. wFlags is some combination of the following:
  22. SND_SYNC (0x0000) -- play synchronously (default)
  23. SND_ASYNC (0x0001) -- play asynchronously
  24. SND_NODEFAULT (0x0002) -- don't use default sound
  25. SND_MEMORY (0x0004) -- lpszSoundName points to a memory file
  26.                        (probably not very useful from VB -ed.)
  27. SND_LOOP (0x0008) -- loop the sound until next sndPlaySound
  28. SND_NOSTOP (0x0010) -- don't stop any currently playing sounds
  29.  
  30. You'll need to create a VB prototype for sndPlaySound().  My VB
  31. is a bit rusty, so I'll simply recommend that you look at your
  32. manual.
  33.  
  34. Hope this helps.
  35.  
  36. Seth
  37.  
  38.