# 高手帮忙看一下这个api的副程式哪里错了

Posted by slimov on November 17, 1999 at 16:54:04:

Sub AVI2(pathname)
Dim mciCommand As String

mciSendString "close all", vbNullString, 0, 0

mciCommand = "open " & pathname & " alias MyAVI"
mciCommand = mciCommand & " parent " & Picture1.hWnd & " style child"
mciSendString mciCommand, vbNullString, 0, 0

With Picture1
.ScaleMode = vbPixels
mciCommand = "put MyAVI window at 0 0 " & _
.ScaleWidth & " " & .ScaleHeight
mciSendString mciCommand, vbNullString, 0, 0
End With

mciSendString "play MyAVI", vbNullString, 0, 0

End Sub

Follow Ups: