打开文件时出现问题 [英] problem in opening a file

查看:119
本文介绍了打开文件时出现问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好

i在获取avi和mp4文件以及在Axwindowmediaplayer1上播放时遇到了问题



i感觉我得到了我的代码正确,但也许不是,但这里是



使用ofd作为新的OpenFileDialog

ofd.Filter =仅限视频文件(* .mp4 *)| * .mp4 * |(*。avi *)| * .avi *

ofd.Title =选择文件

ofd。 Multiselect = False

如果ofd.ShowDialog()= Windows.Forms.DialogResult.OK那么

AxWindowsMediaPlayer1.URL = OpenFileDialog1.FileName

结束如果

结束使用



我的目的是让它打开一个mp4或avi文件并在Axwindowmediaplayer1上播放

提前感谢

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

推荐答案

如果没有安装编解码器,它就不会播放mp4。如果avi不是原始的,如果没有安装编解码器,它就不会播放它。它不会开始播放除非自动播放设置为true,而不调用(从内存中)对象上的CtlControls类的Play方法。



这是VB6还是VB.NET?
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 ?


这篇关于打开文件时出现问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆