| | |
How to play Video?
Please support our C# advertiser: Intel Parallel Studio Home
Thread Solved |
•
•
Join Date: Jun 2009
Posts: 210
Reputation:
Solved Threads: 15
0
#11 22 Days Ago
•
•
•
•
Hi all,
Can anyone tell me how can we play the video(.wmv) in C# window application .................?
http://www.codeproject.com/KB/direct...diaplayer.aspx
Last edited by avirag; 22 Days Ago at 2:34 am.
0
#12 22 Days Ago
Vibhorg -- Adatapost provided the article you should read regarding embedding the media player. Take a look and see if that solution meets your needs.
•
•
•
•
Well sknake i have done whatever you mentioned here,
BUt now tell me how can i run the video inside this........?
•
•
Join Date: Aug 2009
Posts: 56
Reputation:
Solved Threads: 1
0
#13 22 Days Ago
•
•
•
•
Vibhorg -- Adatapost provided the article you should read regarding embedding the media player. Take a look and see if that solution meets your needs.
C# Syntax (Toggle Plain Text)
axWindowsMediaPlayer1.URL = @"C:\Documents and Settings\All Users\Documents\My Music\Sample Music\Videofile.wmv";
Kindly help me in that Sknake..
Last edited by VibhorG; 22 Days Ago at 3:05 am.
0
#14 22 Days Ago
This depends how you have the videos inbuilt. If they're compiled in as an embedded resource you could do something like:
Be sure to clean up your temp files when the application closes.
C# Syntax (Toggle Plain Text)
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 when the application closes.
•
•
Join Date: Aug 2009
Posts: 56
Reputation:
Solved Threads: 1
0
#15 22 Days Ago
•
•
•
•
This depends how you have the videos inbuilt. If they're compiled in as an embedded resource you could do something like:
C# Syntax (Toggle Plain Text)
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 when the application closes.
Let i have a folder(name video) in my application, and i m put(copy) some videos in that folder, now i want to play these videos into my form.
How can i do this ..............
I thing now my problem is clear to you.....
0
#16 22 Days Ago
Just set the path to
C:\Program Files\Wherever you installer your application\Videos\video1.mpg and play the video. I don't understand why this is a problem? Last edited by sknake; 22 Days Ago at 3:56 am.
0
#18 21 Days Ago
Its a far back reference, but using DirectX is a very good practice. and all windows computers XP and up have DirectX installed. It's installed with windows and comes as an automatic update as well. The managed directX libraries have very easy to use audio and video objects that is as simple as passing it a filepath, giing it a parent control to play on, and calling play.
This is just for future reference. Glad you already have this solved.
This is just for future reference. Glad you already have this solved.
![]() |
Similar Threads
- Play video/flash over the desktop (C++)
- Flash drives won't play video files on 8GB & 16GB drives, but will play on 2GB drives (Storage)
- How to use asp.net Ajax play video? (JavaScript / DHTML / AJAX)
- Freeze when trying to play video files (Windows NT / 2000 / XP)
- can't play video games or watch dvd (Windows NT / 2000 / XP)
Other Threads in the C# Forum
- Previous Thread: close button event for form
- Next Thread: get name of file opened through file association
| Thread Tools | Search this Thread |
.net access algorithm array barchart bitmap box broadcast c# check checkbox client combobox control conversion csharp custom cyclethruopenforms data database datagrid datagridview dataset date/time datetime degrees development dll draganddrop drawing encryption enum event excel file finalyearproject form format forms function gdi+ getoutlookcontactusinfcsvfile globalization httpwebrequest image index input install installer java label list listbox mandelbrot math mono mouseclick mysql operator panel path photoshop picturebox pixelinversion post programming radians regex remote remoting richtextbox save server silverlight sleep socket sql sql-server statistics stream string table text textbox thread time timer timespan update usercontrol users validate validation visualstudio webbrowser wia windows winforms wpf xml






