| View previous topic :: View next topic |
| Author |
Message |
Exodias Expert Cheater
Reputation: 0
Joined: 14 May 2008 Posts: 220
|
Posted: Tue Dec 16, 2008 9:24 pm Post subject: VB.Net Help ( Or VB6 idk) |
|
|
What I like to know is, is it possible to play a music file without having it on the PC
Like For example I put in a Window Media Player on my program, I want to play a song that you do not have on your computer
Is it possible for me to put that MP3 file into the program so that you do not need to have the MP3 file in the same folder as the program?
Im talking about when you open the program, music starts playing. and then repeat if only 1 song can be inputed, shuffle if more than 1 song
im sorry if it sounds confusing, I tried to explain it best that I can
|
|
| Back to top |
|
 |
FullyAwesome I post too much
Reputation: 0
Joined: 05 Apr 2007 Posts: 4438 Location: Land Down Under
|
Posted: Tue Dec 16, 2008 9:48 pm Post subject: |
|
|
i'm not sure how, because i haven't done it before, but a better explanation of what you're trying to do is embed an mp3 file as a resource in an application.
_________________
|
|
| Back to top |
|
 |
Wintermoot Expert Cheater
Reputation: 0
Joined: 08 Nov 2007 Posts: 198
|
Posted: Tue Dec 16, 2008 10:48 pm Post subject: |
|
|
| Do you want to embed the file or load it from the web? Because, from the web, it is as easy as assigning the path to be the web address "musicplayer.file = "www.lol.com/somemusic.mp3" (I forgot the names...)
|
|
| Back to top |
|
 |
holyman Master Cheater
Reputation: 0
Joined: 08 Oct 2005 Posts: 347
|
Posted: Wed Dec 17, 2008 1:09 am Post subject: |
|
|
u can embed it into the program i think but i normally just use the built in media player and a url
_________________
|
|
| Back to top |
|
 |
hacksign23 Master Cheater
Reputation: 0
Joined: 26 Nov 2006 Posts: 404
|
Posted: Wed Dec 17, 2008 1:14 am Post subject: |
|
|
umm... i know that in vb.net, all you do is just put it inside the .resx (resourcses) thingy.
_________________
|
|
| Back to top |
|
 |
killersamurai Expert Cheater
Reputation: 0
Joined: 10 Sep 2007 Posts: 197 Location: Colorado
|
Posted: Wed Dec 17, 2008 2:21 am Post subject: |
|
|
You could make it a resource, but I wouldn't do it that way.
Reason:
You can only add music if you
A. Compile it with the added music
B. Manually add it
The best way would be to remember the file location.
Process:
*load the file with all the locations
*check to see if the file is actually there
-if true, continue to load
-else
:erase from database
:display a message
*play music if found
*song end
-if more than one song, else repeat
:check to see if nothing happened to the file \\some one erased/moved the file
-if erased/moved, else play music
:erase from database
:display message
:move on to next file location in database and check
-if empty repeat what ever is in the database
It might be more work, but it's easier to add music. You could always make a file that holds the music files, but then you'll have to come up with a way to structure the file and removing/adding music files to it.
|
|
| Back to top |
|
 |
|