Khilen Maniyar
Khilen Maniyar

Reputation: 2579

Play .WMV with C#.Net

Hi I want to play a WMV (Or Video File ) in C# Application..

I Have made software in which when i click file then File menu opens then i select the media file but then when i click on play then file should be played..

so please guide me...

and if any dll is required then please tell me ...

thanks in advance

Upvotes: 3

Views: 4722

Answers (3)

James Manning
James Manning

Reputation: 13579

on the more complicated but powerful side of things, you could host one of the silverlight players in your app.

http://silverlightviewport.codeplex.com/

Upvotes: 0

Andy
Andy

Reputation: 2774

You can use the DirectX AudioVideoPlayback library. It's not the best, but it's pretty simple to use:

http://msdn.microsoft.com/en-us/library/bb324497(VS.85).aspx

Upvotes: 2

Albin Sunnanbo
Albin Sunnanbo

Reputation: 47038

You can use

System.Diagnostics.Process.Start("filename");

To start the media file in the default media player.

Or you can use SoundPlayer if you want to control the playing from code.

System.Media.SoundPlayer player = new System.Media.SoundPlayer("filename");
player.Play();

Edit: Sorry, SoundPlayer is only for sounds.

Upvotes: 0

Related Questions