Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: VB
hello
i got a litle problem in getting a avi and mp4 file to open and to be played on Axwindowmediaplayer1
 
i feel i got my code correct but maybe it is not, but here it is
 
Using ofd As New OpenFileDialog
ofd.Filter = "Video File Only (*.mp4*)|*.mp4*|(*.avi*)|*.avi*"
ofd.Title = "Select File"
ofd.Multiselect = False
If ofd.ShowDialog() = Windows.Forms.DialogResult.OK Then
AxWindowsMediaPlayer1.URL = OpenFileDialog1.FileName
End If
End Using
 
my aim is to make it open an mp4 or avi file and play it on the Axwindowmediaplayer1
thank in advance
Posted 7-Jan-13 15:14pm
sean871501
Comments
Sergey Alexandrovich Kryukov at 7-Jan-13 22:31pm
   
First of all, don't post your answers as "Solution". I saw it: this is VB.NET. My advice: never call it VB. Who would like to answer the questions on VB?
—SA

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

It won't play an mp4 if the codecs are not installed. If the avi is not raw, it won't play it, if the codecs are not installed. It won't start playing it unless auto play is set to true, without you calling the Play method of ( from memory ) the CtlControls class on the object.
 
Is this VB6 or VB.NET ?
  Permalink  
Comments
Sergey Alexandrovich Kryukov at 7-Jan-13 22:31pm
   
OP answered that this is VB.NET...
—SA
Christian Graus at 7-Jan-13 22:32pm
   
Thanks - it did not change the answer, but I thought it was worth pointing out it was not clear.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 355
1 _Amy 235
2 Peter Leow 185
3 Andreas Gieriet 180
4 Dave Kreskowiak 155
0 OriginalGriff 7,540
1 Sergey Alexandrovich Kryukov 6,462
2 Maciej Los 3,849
3 Peter Leow 3,653
4 CHill60 2,712


Advertise | Privacy | Mobile
Web04 | 2.8.140721.1 | Last Updated 7 Jan 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100