Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations dencom on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

File location

Status
Not open for further replies.

VB4Life

Programmer
Nov 8, 2008
50
US
Hi All.
Just trying to figure out how to keep a wav file in my project as an embedded file. So I am looking for the best practice and how to call it. I use system.media.soundplayer. I can play them just fine with a local file on the PC.
 
Code:
        My.Computer.Audio.Play(My.Resources.mywavfile, AudioPlayMode.WaitToComplete)

Zameer Abdulla
 
Yes that works, but how can I use System.Media.SoundPlayer with an embedded file? It does not recognize the Resource file, maybe I'll put it in the Application.StartupPath.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top