Highlights
All Snippets
Top 100 Snippets
Librarians
gbCodeLib

By Language
VB6
JavaScript
Perl
HTML
SQL
Java
DOS

GBIC >> Source Code >> Visual Basic >> Snippet

Play video (MM control)


'multimedia control supports AVI, MPG video files - .WAV, MID audio files - music CD in CD-ROM drive
'does not support .MP3 files
'multimedia control can be visible, or not.
'if visible, user can press buttons to control actions
'if not visible, control of files to be played is handled via code only

'Video-
'in form_load
MMControl1.Notify = False
MMControl1.Wait = True
MMControl1.Shareable = False
MMControl1.hwdDisplay = Picture1.hWnd     'designate the Picturebox to display the video file
'then to play .avi file
MMControl1.FileName = "c:\test.avi"
MMControl1.Command = "Open"
'then to play .mpg file
MMControl1.FileName = "c:\test.mpg"
MMControl1.Command = "Open"