all groups > dotnet sdk > june 2006 >
You're in the

dotnet sdk

group:

Playing multimedia files in Windows Forms


Playing multimedia files in Windows Forms rjoubert
6/1/2006 7:17:02 AM
dotnet sdk:
I had a little downtime and was doing some exploring. I found out that
there's a very easy way to play a WAV file in your Windows application. All
you need is the following 3 lines of code:

Dim sp as New System.Media.SoundPlayer
sp.SoundLocation = [full path or URL to the WAV file]
sp.Play( )

Now, this ONLY seems to work for WAV files. My first question is WHY? I
know the obvious answer is that the WAV file format was created by MS. But
with the prevelance of MP3 files, why not include a simple way to play MP3
files in Windows apps (besides having to use the DirectX 9 SDK)?

Secondly, why only include this functionality for sound files? What about
video files? Again, the only way I see to do this is to use the DirectX 9
SDK.
Re: Playing multimedia files in Windows Forms Greg Young
6/11/2006 9:29:18 PM
You can embed WMP in your app quite easily to support all of these items.

Perhaps I am missing something?

Cheers,

Greg Young
MVP - C#
http://codebetter.com/blogs/gregyoung

[quoted text, click to view]

RE: Playing multimedia files in Windows Forms William Sullivan
7/6/2006 12:04:01 PM
Yeah, it does seem weird that .NET doesn't have much support in the regular
framework for multimedia. Managed DirectX is where all the fun is at.

[quoted text, click to view]
AddThis Social Bookmark Button