问题描述
你好
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
推荐答案
这篇关于打开文件时出现问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!