| | |
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 27 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; 27 Days Ago at 2:34 am.
0
#12 27 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 27 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; 27 Days Ago at 3:05 am.
0
#14 27 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 27 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 27 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; 27 Days Ago at 3:56 am.
0
#18 26 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 ado.net algorithm array barchart bitmap box broadcast buttons c# check checkbox client color combobox control conversion csharp custom database databasesearch datagrid datagridview datagridviewcheckbox dataset datetime degrees development draganddrop drawing dynamiccreation encryption enum equation event excel file form format formatting forms function gdi+ httpwebrequest image index input install interface java label list listbox mandelbrot math mouse mouseclick mysql namevaluepairs operator path photoshop picturebox pixelinversion post powerpacks programming property radians regex remote remoting resource restore richtextbox server sleep socket sql statistics stream string table text textbox thread time timer update usercontrol validation visualstudio wait webbrowser windows winforms working wpf xml






