请高手指点一下,为什么第一次调用时没有反应,第二次以后就可以了呀?
这是一段播放视频的代码,第一次调用的时候总是没有反应,第二次以后就可以了,是什么原因呢?请高手指点一下,先谢谢了!
Main()
PROCEDURE Main()
LOCAL loForm
loForm = CREATEOBJECT("C_Form")
WITH loForm
.Caption = "播放多媒体文件"
.AutoCenter = .T.
.Show
.Windowstate=2
ENDWITH
READ EVENTS
ENDPROC
DEFINE CLASS C_Form AS Form
ADD OBJECT MusicPlayer AS OleControl WITH OleClass = "WMPlayer.OCX.7", Width = sysmetric(21)-25, Height = sysmetric(22)-80
PROCEDURE Arrange
WITH ThisForm.MusicPlayer
.Top = 10
.Left = 10
ENDWITH
ENDPROC
PROCEDURE Activate
ThisForm.Arrange
ThisForm.MusicPlayer.URL = bfwj
ENDPROC
PROCEDURE Resize
ThisForm.Arrange
ENDPROC
PROCEDURE Destroy
CLEAR EVENTS
ENDPROC
ENDDEFINE