Private Sub ActiveMovie1_StateChange(ByVal oldState As Long, ByVal newState As Long)
    Dim NewWidth As Long
    Dim NewHeight As Long
    
    If newState = 2 Then
       NewWidth = Form1.Width - (Form1.ScaleWidth - (ActiveMovie1.Left + ActiveMovie1.Width)) + 120
       NewHeight = Form1.Height - (Form1.ScaleHeight - (ActiveMovie1.Top + ActiveMovie1.Height)) + 120
       Form1.Width = NewWidth
       Form1.Height = NewHeight
       
End SubPrivate Sub Command1_Click()
    ActiveMovie1.FileName = "D:\temp\blowup.avi"                    '你想要打开的AVI文件
    Do Until ActiveMovie1.CurrentState = amvStopped
    DoEvents
    Loop
    ActiveMovie1.Run
    
End Sub