我用MCI,mmcontrol播放avi,图像绑定到一个picture上。怎么才能让,avi的画面和picture box 的尺寸一样?
Private Sub Command1_Click()
MMControl1.hWndDisplay = Picture1.hWnd
MMControl1.filename = "c:\winnt\clock.avi"
MMControl1.DeviceType = "AVIVIDEO"
Picture1.AutoRedraw = True
MMControl1.Command = "OPEN"
MMControl1.To = 1
MMControl1.Command = "SEEK"
MMControl1.Command = "PLAY"
End Sub另外,像要播放.wav 和.mid的文件,MMControl1.DeviceType 因该是什么?我没找到帮助文件。多谢!!
Private Sub Command1_Click()
MMControl1.hWndDisplay = Picture1.hWnd
MMControl1.filename = "c:\winnt\clock.avi"
MMControl1.DeviceType = "AVIVIDEO"
Picture1.AutoRedraw = True
MMControl1.Command = "OPEN"
MMControl1.To = 1
MMControl1.Command = "SEEK"
MMControl1.Command = "PLAY"
End Sub另外,像要播放.wav 和.mid的文件,MMControl1.DeviceType 因该是什么?我没找到帮助文件。多谢!!
Waveaudio
.mid
Sequencer
画面什么问题呢?
多谢!!
Me.ScaleMode = vbPixels mciSendString "stop movie", vbNullString, 0, 0
mciSendString "close movie", vbNullString, 0, 0
Dim s As String
s = "D:\test\head.avi"
mciSendString "open AVIvideo!" & s & " alias movie parent " & picture1.hwnd & " style child", vbNullString, 0, 0
mciSendString "put movie window client at 0 0 " & picture1.ScaleWidth & " " & picture1.ScaleHeight, vbNullString, 0, 0
mciSendString "play movie", vbNullString, 0, 0
End Sub