AxWindowsMediaPlayer1

Do you need something made? then ask in here.
Forum rules
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
6 posts Page 1 of 1
Contributors
User avatar
lesan101
Top Poster
Top Poster
Posts: 193
Joined: Tue Jun 29, 2010 8:10 am

AxWindowsMediaPlayer1
lesan101
Does anyone know how to play a windows media player video on a form, that is coming from the resources of the program??

the video is a .wmv <-- same as .wma i guess

i have a AxWindowsMediaPlayer1 already on form

but what the heck ?!?! i tried everything.

i want to pick it up of the resource not no C drive !


so does anyone know ?
Image
User avatar
Scottie1972
Codenstuff Elite
Codenstuff Elite
Posts: 953
Joined: Thu Jan 14, 2010 5:48 am

Re: AxWindowsMediaPlayer1
Scottie1972
it would probly be best to just have the .wmv in the same location as the main program file, and just use this to open the .wmv
Code: Select all
AxWindowMediaPlayer1.URL = Application.StartUpPath & "\myVideo.wmv"
If you where to exstract the video everythime you opened the program...it would take a long time to load depending on how large the video file is.
Image
User avatar
lesan101
Top Poster
Top Poster
Posts: 193
Joined: Tue Jun 29, 2010 8:10 am

Re: AxWindowsMediaPlayer1
lesan101
if that is the case, is it possible to extract whats in the resource into a folder in the desktop or something?

then the player will just pick it up by there. ?
Image
User avatar
MrAksel
C# Coder
C# Coder
Posts: 1758
Joined: Fri Mar 26, 2010 12:27 pm

Re: AxWindowsMediaPlayer1
MrAksel
Yes you can use this code to save the movie resource to a file:
Code: Select all
Dim MovieData() As Byte
MovieData = My.Resources.Movie ' Change 'Movie' to the resource name
My.Computer.FileSystem.WriteAllBytes(Application.StartUpPath & "\myVideo.wmv", MovieData, False)
Then you can use Scottie's code.
LMAOSHMSFOAIDMT
Laughing my a** of so hard my sombrero fell off and I dropped my taco lmao;


Over 30 projects with source code!
Please give reputation to helpful members!

Image
Image
User avatar
lesan101
Top Poster
Top Poster
Posts: 193
Joined: Tue Jun 29, 2010 8:10 am

Re: AxWindowsMediaPlayer1
lesan101
Thank you MrAksel & Scottie1972 !
I have completed my program thanks to you.

out of curiosity, where does t extract it to?
Image
User avatar
MrAksel
C# Coder
C# Coder
Posts: 1758
Joined: Fri Mar 26, 2010 12:27 pm

Re: AxWindowsMediaPlayer1
MrAksel
It extracts to the path where the application was started. For example if you ave your .exe file on your desktop, it would save the movie to the desktop
LMAOSHMSFOAIDMT
Laughing my a** of so hard my sombrero fell off and I dropped my taco lmao;


Over 30 projects with source code!
Please give reputation to helpful members!

Image
Image
6 posts Page 1 of 1
Return to “Tutorial Requests”