martin2k

ForumsVB6GamesSoftwareDirectoryHTMLArticlesBlogContact

How do I play a video file in full screen?


 

Home

Read and add posts to the Visual Basic 6.0 Forums

Download some of my programs and OCXs

Read the Tips here

The old style forum is still available here

Contact


 

Question

From: Edgar Zamora M
Date: Saturday 22 June 2002 5:04 AM
Subject: Help with MPEG in VBl, Please !
Question: Hi:
I saw your name in a VB forum, you explained about how to play MPEG in VB. I need to create a simple application that plays an MPEG movie, full screen, no controls visible, No user interaction. (if possible).
I know i gotta use the Windows Media Player control - MSDXM.OCX but Iīm not an expert and I donīt know what is the code for doing this.

Please, help me. What are the events, and code for this.

Thank you so much !!

Firstly, add the control to the form and set the Visible property to False, then add this code when you want to play the file:

MediaPlayer1.FileName = "C:\Music\File.mpg"
MediaPlayer1.DisplaySize = mpFullScreen

Also add this code:

Private Sub wmp_DisplayModeChange()
MediaPlayer1.FileName = ""
End Sub

blog comments powered by Disqus
Martin Allen 1999 - 2011.  Last updated Saturday 13 August 2011 12:15:19 AM +0100.