Hi all,
Can anyone tell me how can we play the video(.wmv) in C# window application .................?
Let i have some links on window form, As the user click on that link, related video should start playing.....
And i am using VS2008.......
Kindly help me regarding this............
VibhorG
0
Junior Poster in Training
Recommended Answers
Jump to PostYou can embed windows media player in your application which can play videos from your harddrive or stream them from a URL.
Add a reference to "Windows Media Player" aka Interop.WMPLib.dll, and then navigate to the controls in that DLL (using the "customize toolbox" menu option). You will see …
Jump to PostGood suggestion from scott. Here is a good example to play a video using DirectX - http://www.codeproject.com/KB/graphics/zMoviePlayer.aspx. You may use MCI - Media Control Interface …
Jump to Post. Here is a good example to play a video using DirectX - .
You can also play video in a 3d space using the XNA framework if you want to do some fanciness
Jump to PostTake a look at this article - http://msdn.microsoft.com/en-us/library/dd562851(VS.85).aspx
Jump to PostThis depends how you have the videos inbuilt. If they're compiled in as an embedded resource you could do something like:
private void button3_Click(object sender, EventArgs e) { string tmpFile = System.IO.Path.GetTempFileName(); File.WriteAllBytes(tmpFile, Properties.Resources.File_MOV); //mediaPlayer.URL = tmpFile; //mediaPlayer.Play(); }
Be sure to clean up your temp files …
All 17 Replies
sknake
1,622
Senior Poster
Featured Poster
kvprajapati
commented:
Good suggestion.
+6
kvprajapati
1,826
Posting Genius
Team Colleague
jbennet
1,618
Most Valuable Poster
Team Colleague
Featured Poster
kvprajapati
commented:
Great!
+6
VibhorG
0
Junior Poster in Training
VibhorG
0
Junior Poster in Training
VibhorG
0
Junior Poster in Training
VibhorG
0
Junior Poster in Training
VibhorG
0
Junior Poster in Training
kvprajapati
1,826
Posting Genius
Team Colleague
avirag
10
Posting Whiz
sknake
1,622
Senior Poster
Featured Poster
VibhorG
0
Junior Poster in Training
sknake
1,622
Senior Poster
Featured Poster
VibhorG
0
Junior Poster in Training
sknake
1,622
Senior Poster
Featured Poster
VibhorG
0
Junior Poster in Training
Diamonddrake
397
Master Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.