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 16:14pm
sean871507
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 OriginalGriff 195
1 Afzaal Ahmad Zeeshan 132
2 ProgramFOX 130
3 Maciej Los 115
4 Sergey Alexandrovich Kryukov 75
0 OriginalGriff 6,564
1 Sergey Alexandrovich Kryukov 6,048
2 DamithSL 5,228
3 Manas Bhardwaj 4,657
4 Maciej Los 4,150


Advertise | Privacy | Mobile
Web04 | 2.8.1411022.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