Article View: alt.lang.basic
Article #20Re: How do I play .WAV sounds in Visual Basic?!?
From: Galen Raben
Date: Mon, 02 Nov 1992 18:43
Date: Mon, 02 Nov 1992 18:43
22 lines
1032 bytes
1032 bytes
In alt.lang.basic, bdwheele@silver.ucs.indiana.edu (Brian Wheeler) writes:
>I've got VB 1.0 and I was wondering how I can play .WAV sounds.
>Is it possible?
>Brian Wheeler
>--
Using Windows 3.1 this is pretty simple, in the global module declare:
Declare Function sndPlaySound Lib "MMsystem" (ByVal lpSound As String, ByVal Flags As Integer) As Integer
Global Const SND_SYNC = 0 'play synchronously (default)
Global Const SND_ASYNC = 1 'play asynchronously
In your program simply put:
Ret% = SndPlaySound("TADA.WAV", SND_ASYNC)
Have fun!!!!!
- Galen -
Technical Details
Message-ID:
<33680007@hpgrla.gr.hp.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!walter!bellcore!rutgers!noao!asuvax!cs.utexas.edu!sdd.hp.com!scd.hp.com!hpscdm!hplextra!hpfcso!hpgrla!galenrReferences:
<Bx1r6p.C71@usenet.ucs.indiana.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!walter!bellcore!rutgers!noao!asuvax!cs.utexas.edu!sdd.hp.com!scd.hp.com!hpscdm!hplextra!hpfcso!hpgrla!galenr From: galenr@hpgrla.gr.hp.com (Galen Raben) Newsgroups: alt.lang.basic Subject: Re: How do I play .WAV sounds in Visual Basic?!? Message-ID: <33680007@hpgrla.gr.hp.com> Date: 2 Nov 92 18:43:29 GMT References: <Bx1r6p.C71@usenet.ucs.indiana.edu> Organization: Hewlett-Packard, Greeley, CO Lines: 22