Home All Groups Group Topic Archive Search About

where to store sound file

Author
21 Jul 2006 6:34 PM
martin1
Hi, All,
The app retrieve sound.wav file from my loacal C drive, is there anyway the
sound file can be stored in the app? then when building, it  goes with app
rather than sending sound file seperate with app when deploying the app. 
Thanks

Author
21 Jul 2006 6:46 PM
Herfried K. Wagner [MVP]
"martin1" <mart***@discussions.microsoft.com> schrieb:
> The app retrieve sound.wav file from my loacal C drive, is there anyway
> the
> sound file can be stored in the app? then when building, it  goes with app
> rather than sending sound file seperate with app when deploying the app.

In VB 2005 select "My Project" -> "Resources" and add the file as a
resource.  In VB.NET 2002/2003 add the file to the project and set its
'Build Action' property to 'Embedded Resource' in the properties window.

--
M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://classicvb.org/petition/>
Author
21 Jul 2006 7:19 PM
martin1
when I go to solution explorer in VB NET 2005, then double click My Project,
it open and then click Resources in left menu and add resource, it add just
source name, it is not stored sound.wav file. Also go to application folder
in C drive and open My Project folder and cannot find Resources folder, need
manually add the resources folder?  So my 2 questions is where to find
Resources Folder? and where to store sound file? Thanks

Show quoteHide quote
"Herfried K. Wagner [MVP]" wrote:

> "martin1" <mart***@discussions.microsoft.com> schrieb:
> > The app retrieve sound.wav file from my loacal C drive, is there anyway
> > the
> > sound file can be stored in the app? then when building, it  goes with app
> > rather than sending sound file seperate with app when deploying the app.
>
> In VB 2005 select "My Project" -> "Resources" and add the file as a
> resource.  In VB.NET 2002/2003 add the file to the project and set its
> 'Build Action' property to 'Embedded Resource' in the properties window.
>
> --
>  M S   Herfried K. Wagner
> M V P  <URL:http://dotnet.mvps.org/>
>  V B   <URL:http://classicvb.org/petition/>
>
>
Author
21 Jul 2006 11:03 PM
Herfried K. Wagner [MVP]
"martin1" <mart***@discussions.microsoft.com> schrieb:
> when I go to solution explorer in VB NET 2005, then double click My
> Project,
> it open and then click Resources in left menu and add resource, it add
> just
> source name, it is not stored sound.wav file. Also go to application
> folder
> in C drive and open My Project folder and cannot find Resources folder,
> need
> manually add the resources folder?

IIRC the resource is stored inside a ResX file.

--
M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://classicvb.org/petition/>
Author
22 Jul 2006 7:46 AM
Oenone
Herfried K. Wagner [MVP] wrote:
> In VB 2005 select "My Project" -> "Resources" and add the file as a
> resource.  In VB.NET 2002/2003 add the file to the project and set its
> 'Build Action' property to 'Embedded Resource' in the properties
> window.

Just out of curiosity, are there any advantages to the VB2005 method you've
described above?

I'm using VB2005, but I still embed resources in the same way as you
describe for VB2002/2003. This works very nicely IMO, as I can structure the
resources into a directory hierarchy, check them in and out of SourceSafe
from within the Solution Explorer, and also include resources such as To Do
lists that I want to be able to access but which don't get compiled into my
project (by setting the Build Action to None).

It seems to me that the "new" way of doing this would lose all of these
features. Is there something else that I'm missing?

TIA,

--

(O)enone
Author
22 Jul 2006 10:43 AM
Michel Posseth [MCP]
In the by you described situation

it seems to me that you should better create a subdirectory in the
application path were you can put in the sound file
for deployment you can now create a setup ( installer )

advantage

Footprint of your app is smaller , easy to load , easier to extend


regards

Michel Posseth [MCP]


Show quoteHide quote
"martin1" <mart***@discussions.microsoft.com> schreef in bericht
news:97A9D68F-C0A2-469F-9B4E-62758BA54841@microsoft.com...
> Hi, All,
> The app retrieve sound.wav file from my loacal C drive, is there anyway
> the
> sound file can be stored in the app? then when building, it  goes with app
> rather than sending sound file seperate with app when deploying the app.
> Thanks
Author
24 Jul 2006 2:15 PM
martin1
Thank you, Everyone.

The discussion answer my question.

Martin

Show quoteHide quote
"Michel Posseth  [MCP]" wrote:

> In the by you described situation
>
> it seems to me that you should better create a subdirectory in the
> application path were you can put in the sound file
> for deployment you can now create a setup ( installer )
>
> advantage
>
> Footprint of your app is smaller , easy to load , easier to extend
>
>
> regards
>
> Michel Posseth [MCP]
>
>
> "martin1" <mart***@discussions.microsoft.com> schreef in bericht
> news:97A9D68F-C0A2-469F-9B4E-62758BA54841@microsoft.com...
> > Hi, All,
> > The app retrieve sound.wav file from my loacal C drive, is there anyway
> > the
> > sound file can be stored in the app? then when building, it  goes with app
> > rather than sending sound file seperate with app when deploying the app.
> > Thanks
>
>
>