[AccessD] Embedding a WAV file

Rocky Smolin - Beach Access Software bchacc at san.rr.com
Wed Mar 2 12:46:23 CST 2005


Believe it or not, we've had a problem with some people doing this.  It 
would be the 90% solution.  But it just seems to me that if I can use this:

Declare Function sndPlaySound Lib "winmm.dll" Alias "PlaySoundA" _
    (ByVal IpszName As String, ByVal hModule As Long, _
    ByVal dwFLags As Long) As Long

to play an external file there should be some way to use it to play an 
embedded file.  But I can't figure out how.

Rocky

----- Original Message ----- 
From: "Doug Murphy" <dw-murphy at cox.net>
To: "'Access Developers discussion and problem solving'" 
<accessd at databaseadvisors.com>
Sent: Wednesday, March 02, 2005 10:05 AM
Subject: RE: [AccessD] Embedding a WAV file


> Rocky,
>
> Why not just zip your database and the wav file into one zip file for
> testing distribution.  Then tell your testers to leave all the files in 
> the
> same folder when they unzip them?  You can get the path to your 
> application
> so you know the path to the wav file.
>
> Doug
>
> -----Original Message-----
> From: accessd-bounces at databaseadvisors.com
> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin -
> Beach Access Software
> Sent: Wednesday, March 02, 2005 9:25 AM
> To: Access Developers discussion and problem solving
> Subject: Re: [AccessD] Embedding a WAV file
>
>
> Darren:
>
> When I do the installable run-time I think I can include my WAV file and 
> it
> will be transparent to the user. For beta testing I need to send them just
> one file.  So I'm still looking for a way to do this.
>
> I did insert-->Object-->from file and inserted the wav file in an Unbound
> Object Frame.  But getting it to play in the On Click events of other
> controls, like command buttons, is the next problem.  And then, I would
> probably have to insert this UOF in every form.
>
> Is there maybe a way of putting it into a field in a table and running it
> from there so it could be run from any form?
>
> TIA
>
> Rocky Smolin
> Beach Access Software
> http://www.e-z-mrp.com
> 858-259-4334
>
> ----- Original Message ----- 
> From: "Darren DICK" <d.dick at uws.edu.au>
> To: "'Access Developers discussion and problem solving'"
> <accessd at databaseadvisors.com>
> Sent: Tuesday, March 01, 2005 5:18 PM
> Subject: RE: [AccessD] Embedding a WAV file
>
>
>> Hi Rocky
>> I have a folder in the App home folder for sounds. Also one for Images
>> and Skins etc EG
>> C:\Program Files\My app will be the 'home' folder
>> And in it will be
>> C:\Program Files\My app\Sounds (About 5 or 6 files in here)
>> C:\Program Files\My app\Images (3 more folders and about 20 files in 
>> here)
>> C:\Program Files\My app\Skins (1 folder (but it can grow) and many files
>> in
>> here)
>>
>> I install them when I install the app.
>> They are my 'standard' folders and files and go with every app. And I
>> refer to them now by heart with lines like (I actually use globals for
>> the length of the session But can be done at a form Sub level just as
>> easy) EG
>> Dim strSkinToUse as String
>> Dim strSkinFolder as String
>> Dim strImagesFolder as String
>>
>> strSkinToUse = Dlookup("[SkinName]","tblOptions")
>> strSkinFolder = Left(CurrentDb.Name, Len(CurrentDb.Name) -
>> Len(Dir(CurrentDb.Name)) - 1) & "\Skins\" & strSkinToUse
>> strImagesFolder= Left(CurrentDb.Name, Len(CurrentDb.Name) -
>> Len(Dir(CurrentDb.Name)) - 1) & "\Images"
>> strSoundsFolder= Left(CurrentDb.Name, Len(CurrentDb.Name) -
>> Len(Dir(CurrentDb.Name)) - 1) & "\Sounds"
>>
>> Then I refer to each skin component like.....('Cause I know 'em off by
>> heart)
>>
>> Me.picture =  strSkinFolder  & "\Background.jpg"
>> Me.imgMyLogo = strImagesFolder & "\OurLogo.jpg"
>>
>> I use the API code "PlaySound" for Playing Sounds
>> Eg
>> Private Sub Form_Load()
>> PlaySound (strSoundsFolder & "\Logon.wav")
>> End sub
>>
>> It works and is pretty simple.
>>
>> HTH
>>
>> See ya
>>
>> Darren
>>
>> --
>> AccessD mailing list
>> AccessD at databaseadvisors.com
>> http://databaseadvisors.com/mailman/listinfo/accessd
>> Website: http://www.databaseadvisors.com
>>
>
> -- 
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>
>
> -- 
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
> 




More information about the AccessD mailing list