mp3 at startup

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

can anyone tell me how to play an MP3 file at the startup of my application?
thanks
 
do i add those code files to my project? and then how do i use them? i just
dont kno how to call and use them
 
iwdu15 said:
do i add those code files to my project? and then how do i use them? i just
dont kno how to call and use them

There is a testapp.vb file in the project. Look at that file to see how
to use it. You will have to add some of the file to your project.
There is a help file in the project too.

Chris
 
ive looked at that and added the files and i still dont get how to use it
 
iwdu15 said:
not to mention the testapp file is half in VB and half in C++

There is no C++ in the VB file.

Start a new console project, add all the files in the VB.NET folder.
Select TestApp.Main as your startup.

Other than that you may need to some earlier VB lesson to understand the
basics of VB.NET before you tackle something at this level.

Chris
 
i do have some prior knowledge of VB.net, i just havent done sound effects
yet and involving prewritten codes and implimenting them in a project i
started, so then how do i play sounds after adding all the files and making
the testapp the startup?
 
and i put testapp as my startup, then when i ran the program it showed
nothing first off, then after a few seconds, gave an error syaing "object
reference not set to an instance of an object" to the line: " While Not
input.ToLower().Equals("q") "
 
never mind, i can just use the way MSDN says and convert all the file si want
to play to .wav, thanks anyway
 
The testapp works fine. In your project, just add the .vb source files as
"existing items" then you will have to set a couple of references. I just
down loaded and it worked great. You can get the code you need from the
testapp.vb module to incorporate into your program. Sure beats converting
mp3 to wave file.
 
can someone help me with this? i set testapp as the startup but it wont let
me see the code, and onc ei get it to see the code, what do i do so that
FORM1 will load and play an mp3 file? thanks
 
Project Properties =>General:

Output type: Console Application
Startup object: Org.Mentalis.Multimedia.TestApp
 
ok it works now, but what if i want to to load form1 and bypass the console
altogether and play a preselected file?
 
Not sure yet, going to work on that tommorrow.

I know that first I am going to copy LoadMusicFile() from TestApp into a
seperate form application, delete the Console.WriteLine statement and assign
an mp3 to file instead of Console.Readline().

After that I'll add MediaFile.vb and SoundFile.vb to the App and start
stepping through it to get a better idea as to what is going on.

I also imagine that I will need the code from MediaException, but I will do
that last.

Oh, sorry, the short answer to your question would be to cut and paste
LoadMusicFile() from TestApp into your Form1, delete the Console.WriteLine
statement and assign an mp3 to file instead of Console.Readline(), then call
LoadMusicFile() from the forms load event.
Also add MediaFile.vb, SoundFile.vb and MediaException.vb to your project.

If you already have everything added to your project then you will probably
want to delete TestApp.vb at the very least and you probably can get rid of
VidioFile.vb(not positive if you can get rid of that without altering other
code yet), you are also going to have to change Output type: from Console
Application back to Windows Application.


You may have to tweak it, I'm not sure yet, but if it doesn't work you can
step through the code with the debugger and see where it fails.
 
ok i did that and i got the console up but what i want is my form to shwo up
first off and play a preselected file without having the console and such
come up. any way to do this?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Convert WAV to MP3 4
how to convert .3GA to mp3 files? 1
MP3 in VB does not loop seamlessly 6
Slideshow with narration 4
mp3 edit function 1
MP3 Downloads? 8
AlbumArt JPG files for MP3 1
Audiobook MP3 Too Long 4

Back
Top