level 5
Mozartea
楼主
’不管是avi,还是MP4都打不开,错误代码表示格式错误
‘源码如下
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim ofd As New OpenFileDialog With {.Filter = "视频文件| *.mp4; *.mpg; *.avi"}
If ofd.ShowDialog = Windows.Forms.DialogResult.OK Then
Openvideo(ofd.FileName)
End If
End Sub
Public Sub openvideo(ByVal filename)
Static vvv As Video
Try
If (vvv Is Nothing) = False Then
vvv.Dispose()
End If
vvv = New Video(filename)
vvv.Owner = Me
vvv.Size = Me.DefaultSize
vvv.Play()
Catch ex As Exception
MsgBox(ex.ToString)
End Try
End Sub
End Class
2015年04月24日 04点04分
1
‘源码如下
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim ofd As New OpenFileDialog With {.Filter = "视频文件| *.mp4; *.mpg; *.avi"}
If ofd.ShowDialog = Windows.Forms.DialogResult.OK Then
Openvideo(ofd.FileName)
End If
End Sub
Public Sub openvideo(ByVal filename)
Static vvv As Video
Try
If (vvv Is Nothing) = False Then
vvv.Dispose()
End If
vvv = New Video(filename)
vvv.Owner = Me
vvv.Size = Me.DefaultSize
vvv.Play()
Catch ex As Exception
MsgBox(ex.ToString)
End Try
End Sub
End Class