1
当VMP在VBA UserForm中运行时,它会根据剪辑大小和分辨率自动调整大小,而不管Width
和Height
属性是以编程方式设置的。我需要视频具有固定大小。下面的代码什么也不做:vba userform中的Windows Media Player大小
With UserForm1.WindowsMediaPlayer1
.URL = "C:\AnyVideo.mp4"
.Controls.Play
.stretchToFit = True
.Width = 500
.Height = 300
.Top = 0
.Left = 0
End With
下面的代码的工作,但使视频在开始跳跃 - 开始于自己的大小播放,然后跳转到新的大小,而不是一个专业的外观。
With UserForm1.WindowsMediaPlayer1
.URL = "C:\AnyVideo.mp4"
.Controls.Play
End With
Timer_1 = Timer + 1
Do While Timer < Timer_1
DoEvents
Loop
With UserForm1.WindowsMediaPlayer1
.stretchToFit = True
.Width = 600
.Height = 300
.Top = 0
.Left = 0
End With
我环顾四周,发现什么都没有解释发生了什么或解决这个问题。任何人都可以帮忙?