How to Play a MP3 file?

Drache

Active member
Joined
Apr 8, 2006
Messages
26
Programming Experience
Beginner
I am looking for a way to play an MP3 file using VB.NET in windows 7

I know I could use the WMP component, but I would rather not have the additional dll files in the program folder
Using Managed DirectX is also an option, but it is already two generation out of date.

Any ideas would be appriciated.
 

hipturtle

Well-known member
Joined
Dec 1, 2011
Messages
59
Programming Experience
10+
I am looking for a way to play an MP3 file using VB.NET in windows 7

I know I could use the WMP component, but I would rather not have the additional dll files in the program folder
Using Managed DirectX is also an option, but it is already two generation out of date.

Any ideas would be appriciated.

This is fairly easy you can use Process.Start("c:\track01.mp3") for instance this will open in the default player for MP3, I cannot try it on Windows 7 but it works on Vista.

You dont need to import Diagnostics for this, that I have found anyway, If you do then its Imports System.Diagnostics.

Of course this is the basic that you can do with Process.Start, have a play with it.

Regards
 

Drache

Active member
Joined
Apr 8, 2006
Messages
26
Programming Experience
Beginner
Thanks for responding

It is a good idea, but I do not like the idea of relying on an external program, plus you loose control of how the file is played.

I know VB can play uncompressed WAV files natively and I may have to fall back to that, but I would prefer to use an MP3 file.
 

hipturtle

Well-known member
Joined
Dec 1, 2011
Messages
59
Programming Experience
10+
Thanks for responding

It is a good idea, but I do not like the idea of relying on an external program, plus you loose control of how the file is played.

I know VB can play uncompressed WAV files natively and I may have to fall back to that, but I would prefer to use an MP3 file.
In that case surely you can install the windows media player to your program then and play the mp3 through that. I have created a Media Player that plays all sorts of media types including MP3 so long as you have the correct codecs installed.

Regards
 

Drache

Active member
Joined
Apr 8, 2006
Messages
26
Programming Experience
Beginner
I am not sure if I fully understand your idea, but if it what I think and I use the WMP component I would still have the extra dll files in the program folder
I know it may not seem a big thing but I am trying to keep the package as compact as possible.:subdued:
 

hipturtle

Well-known member
Joined
Dec 1, 2011
Messages
59
Programming Experience
10+
I am not sure if I fully understand your idea, but if it what I think and I use the WMP component I would still have the extra dll files in the program folder
I know it may not seem a big thing but I am trying to keep the package as compact as possible.:subdued:
I am sorry then I don't know what else to do.

Good luck
 
Top Bottom