How to load path in code?

NicoVB

Centurion
Joined
Jan 2, 2002
Messages
160
Location
Belgium
Hi,

I have a few sounds I have to load from code... Where does I have to save these sounds ? In which directory???

Does I have to include them as CONTENT????


Which is the easiest one???


Thanks

NIco
 
You can put them wherever you want. Good way would be to put them in the same folder as your application so you can easily get to them from wherever your application is by using Application.StartupPath which returns the folder in which the exe is.
 
Dear Nico,
Open your application folders, which might be in MyDocuments->VB.netProjects,
Open your project, you will find a folder called "bin" created after you run your project. so save them in that folder.
Access them as "Application.StartupPath" at your code.
Application.StartupPath takes you to the bin folder.

Cheers.
Mohsen
for more questions email me on :
mohsenfarran@yahoo.com
 
Hi


thanks for the answers,

but another question: WILL this be the same if I deploy my application. WIll he automatically find the file??
 
Yes it works!

Application.StartupPath gives the path were are the application executed from. At the moment were the function was called this information is created and not at design time.
 
Back
Top