Situation:
I've been working on a small application that reads a .nfo text file and plays .it music in background in a custom form. For a long time I let it read those files from the system, but in this case I have to sent the files with my program and they have to be copied to a specific location to work.
See my article for my complete project:
Creating a NFO Viewer in C# as a beginner[
^]
My desired application:
In the final version I would like to have these files within my application.
I already managed to add the .nfo text file as a resource, so I don't have to sent that file with my app anymore. See how I fixed that
here[
^].
Now I still have to figure out how to add and use the .it music file as a resource. I can't make this a text file and the code I use always throws errors at me.
I use the following music modplayer to play these files:
irrKlang[
^]
Refer to my Article again to see what I had to do and what code I used to get this working.
After those actions, it plays the music from C:\Test\ with this code:
engine.Play2D("C:\\Test\\Musicfile.it", true);
I want the music in my application, so people don't have to copy/extract the music to that location and that the music runs instantly when my application runs.
My final goal is to use something like
engine.Play2D(Properties.Resources.Musicfile, true)
But I keep getting errors, probably caused by the music not being recognised as music, or the method play2D doesn't like me using a variable as a 'string' in the first comment?
I hope someone can help me out with this part of my project, it's one of the last steps I need fixed to release my application.
Thanks!