Article View: alt.lang.basic
Article #232Re: WAV in VB
From: Galen Raben
Date: Mon, 09 Nov 1992 16:24
Date: Mon, 09 Nov 1992 16:24
20 lines
970 bytes
970 bytes
In alt.lang.basic, strong-john@yale.edu (John Strong) writes:
>Hi,
> Can someone please repost the code to play .WAV files in Visual BASIC in
>Windows 3.1? Thanks!
Here it is again...
In the global module declare the API function:
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:
Result% = SndPlaySound("TADA.WAV", SND_ASYNC)
- Galen -
Technical Details
Message-ID:
<33680008@hpgrla.gr.hp.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!zaphod.mps.ohio-state.edu!sdd.hp.com!scd.hp.com!hpscdm!hplextra!hpfcso!hpgrla!galenrReferences:
<1ddp7cINNcit@MINERVA.CIS.YALE.EDU>Show Full Headers
Complete Article Headers
From: galenr@hpgrla.gr.hp.com (Galen Raben) Date: Mon, 9 Nov 1992 16:24:16 GMT Subject: Re: WAV in VB Message-ID: <33680008@hpgrla.gr.hp.com> Organization: Hewlett-Packard, Greeley, CO Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!zaphod.mps.ohio-state.edu!sdd.hp.com!scd.hp.com!hpscdm!hplextra!hpfcso!hpgrla!galenr Newsgroups: alt.lang.basic References: <1ddp7cINNcit@MINERVA.CIS.YALE.EDU> Lines: 20