|
-
April 11th, 2001, 08:38 AM
#1
media player
What control would I use to be able to play a windows media player video
on my form .avi, .mpeg, .rm files? Would there be any code for this? Can
someone give me a code snippet? Is there something to set in the propertiees?
-
April 11th, 2001, 02:58 PM
#2
Re: media player
Here is some code using the MCI Multimedia control
Private Sub Form_Load ()
' Set properties needed by MCI to open.
MMControl1.Notify = FALSE
MMControl1.Wait = TRUE
MMControl1.Shareable = FALSE
MMControl1.DeviceType = "WaveAudio"
MMControl1.FileName = "C:\WINDOWS\MMDATA\GONG.WAV"
' Open the MCI WaveAudio device.
MMControl1.Command = "Open"
End Sub
This code plays a wave file. However by changing the DeviceType string you can change what type of media you want to play.
Here is a description from the MSDN
DeviceType Property (Multimedia MCI Control)
Specifies the type of MCI device to open.
Syntax
[form.]MMControl.DeviceType[ = device$]
Remarks
The argument device$ is the type of MCI device to open: AVIVideo, CDAudio, DAT, DigitalVideo, MMMovie, Other, Overlay, Scanner, Sequencer, VCR, Videodisc, or WaveAudio.
The value of this property must be set when opening simple devices (such as an audio CD that does not use files). It must also be set when opening compound MCI devices when the file-name extension does not specify the device to use.
Data Type
String
Good Luck
Joe
-
April 11th, 2001, 08:35 PM
#3
Re: media player
Hey Joe Thanks for the answer. Is there any way to change the size of the window the movie is playing in? I woul like to make it bigger.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|