play sound1.wav from folder in startupup path

Do you need something made? then ask in here.
Forum rules
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
4 posts Page 1 of 1
Contributors
User avatar
zachman61
VIP - Donator
VIP - Donator
Posts: 1892
Joined: Wed Dec 16, 2009 9:56 pm

well title says it all
this is the location it is in the startup folder

assets\sound1.wav
how can i play it
ive got this
Code: Select all
 My.Computer.Audio.Play(Application.StartupPath & "assets\sound1.wav")
also when i put in the full location
Code: Select all
C:\Users\Zachary\Desktop\PROJECTNAMEREMOVED\PROJECTNAMEREMOVED\PROJECTNAMEREMOVED\bin\Debug\assets\sound1.wav
it works fine
Nailing my feet to the floor is easier than using my own muscles to balance, but you don't see me doing that :)
User avatar
Proprogrammer
VIP - Donator
VIP - Donator
Posts: 415
Joined: Sun Oct 03, 2010 11:14 pm

also instead of using & you could use +, well either way works.
------------------------------------------------------------------------------
Proprogrammer, not just a Programmer.
User avatar
CodenStuff
Site Admin
Site Admin
Posts: 4392
Joined: Tue Aug 04, 2009 1:47 am

Hello zachman

You forgot a "\" backslash:
Code: Select all
My.Computer.Audio.Play(Application.StartupPath & "\assets\sound1.wav")
Welcome to CodenStuff.com Learn Code, Love Code. Thank you for being a member of the community.
User avatar
zachman61
VIP - Donator
VIP - Donator
Posts: 1892
Joined: Wed Dec 16, 2009 9:56 pm

ah thank you codenstuff :D Sir
Nailing my feet to the floor is easier than using my own muscles to balance, but you don't see me doing that :)
4 posts Page 1 of 1
Return to “Tutorial Requests”