how to play avi file using vb.net ?? preferable with full screen mode
help me to do this.
Jump to Postyou can also use media player control object.
add this from component.on the form load Me.WindowState = FormWindowState.Maximized AxMediaPlayer1.FileName = "C:\movie1.avi" AxMediaPlayer1.Play() AxMediaPlayer1.ShowControls = False AxMediaPlayer1.AllowChangeDisplaySize = False AxMediaPlayer1.EnableContextMenu = False AxMediaPlayer1.ClickToPlay = False AxMediaPlayer1.SendKeyboardEvents = False Me.Cursor.Hide() At the end of stream event Private Sub …
use a Process, and simply "run" the file (If you happen to know the parameters for launching in fullscreen, then add that too).
Dim prc As New Process
prc.StartInfo.FileName = "C:\mediafile.avi"
prc.StartInfo.Arguments.Insert(0, "-Fullscreen")
prc.Start()
you can also use media player control object.
add this from component.
on the form load
Me.WindowState = FormWindowState.Maximized
AxMediaPlayer1.FileName = "C:\movie1.avi"
AxMediaPlayer1.Play()
AxMediaPlayer1.ShowControls = False
AxMediaPlayer1.AllowChangeDisplaySize = False
AxMediaPlayer1.EnableContextMenu = False
AxMediaPlayer1.ClickToPlay = False
AxMediaPlayer1.SendKeyboardEvents = False
Me.Cursor.Hide()
At the end of stream event
Private Sub AxMediaPlayer1_EndOfStream(ByVal sender As Object, ByVal e As AxMediaPlayer._MediaPlayerEvents_EndOfStreamEvent) Handles AxMediaPlayer1.EndOfStream
AxMediaPlayer1.FileName = "C:\movie2.avi"
AxMediaPlayer1.Play()
End Sub
on the form unload , set back the cursor
Me.Cursor.Show()
thank you...
you're welcome friend :)
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.