I’m making a program that will play some music when it starts and that is easy enough. What I want is to have the music file saved as a part of the solution, so that the music will always play, as opposed to pointing the program towards where the music is saved:
Dim wavMusic As String = "\\My Documents\Visual Studio 2010\Song.wav"
So if I were to move the application to a different computer for example, it wouldn’t be able to find the song. So I want to have that song as part of the .exe so that it can always find it. Thanks.
Oh and I’m using vb and winforms because I’m doing it at school, where delightful things like C and WPF aren’t used.
Put it inside your project resources, accessible as a tab in your project’s properties. You can access all resources using the
My.Resourcesproperty. So:My.Resources.SongVoilà!