title: VB.NET: Can't load audio from resources
body: <p>I'm trying to add multiple sounds on an application using a Public function... When I use the absolute path for my sounds everything works perfectly, but when I'm trying to load them from Resources I don't get any sound output.. Any ideas what's wrong?</p>
  
  <pre><code>Public Class Form1
  
      Public Declare Function mciSendString Lib "winmm.dll" Alias "mciSendStringA" (ByVal lpstrCommand As String, ByVal lpstrReturnString As String, ByVal uReturnLength As Integer, ByVal hwndCallback As Integer) As Integer
  
      Dim musicAlias As String = "myAudio"
  
  
      'Dim musicPath As String = "C:\Users\Teo\Documents\Visual Studio 2015\Projects\test\test\Resources\sound.mp3"
      'Dim musicPath As String = "Resources\sound.mp3"
      'Dim musicPath As String = My.Resources.ResourceManager.GetObject("sound.mp3")
      Dim musicPath2 As String = "C:\Users\Teo\Desktop\sound.mp3"
  
  
      Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
  
          mciSendString("Open " &amp; musicPath &amp; " alias " &amp; musicAlias, CStr(0), 0, 0)
          mciSendString("play " &amp; musicAlias, CStr(0), 0, 0)
      End Sub
  End Class
  </code></pre>
  
  <p>The last one works perfectly, I tried every one of the above... The three comments above are different ways I tried to make it work, but all failed...</p>