Can't get audio file to play in visual basic

  • Thread starter Thread starter Klooger
  • Start date Start date
K

Klooger

Guest
If i specify the file path on my pc that works, but if I share the .exe then it sends an error when it can't find the file, and no matter what I do i cannot seem to get visual studio to recognize any audio files as a resource.

My.Computer.Audio.Play("F:\Users\Klooger\source\repos\Second Try\Second Try\Resources\hitmarker.wav", AudioPlayMode.Background)

This code works perfectly fine

My.Computer.Audio.Play(My.Resources.hitmarker, AudioPlayMode.Background)

This does not, and gives the error "'hitmarker' is not a member of 'my.resources"

and when I check the drop down list it gives me, it lists every image file in my resources folder, but neither of the audio files

View: https://i.imgur.com/3G74bwA.png


I've tried everything I could think of, but it just will not recognize any audio files at all, and I've wasted a couple hours on this by now.

View: https://i.imgur.com/MJD7UAO.png


View: https://i.imgur.com/rfbD9Rm.png


View: https://i.imgur.com/wwhnsGB.png


I'd really appreciate any help with this, and sorry about any formatting issues, this is my first post here.

Continue reading...
 
Back
Top