到底该怎样CLEAR EVENTS才能只退出当前事件处理程序而不是结束所有的事件处理程序呢?
1、你退出当前事件?是指退出你这个表单?loForm = CREATEOBJECT("C_Form")??
2、要是你退出loForm = CREATEOBJECT("C_Form")后,还要运行1个叫loForm = CREATEOBJECT("D_Form")的表单?有2种方法
(1)就是退出loForm = CREATEOBJECT("C_Form")的时候,不要CLEAR EVENTS,直接THISFORM.RELEASE
(2)在退出loForm = CREATEOBJECT("C_Form")的时候,CLEAR EVENST,运行loForm = CREATEOBJECT("D_Form")新表单的是,重新READ EVENTS。
你的主程序改为
PROCEDURE Main()
LOCAL loForm
loForm = CREATEOBJECT("C_Form")
WITH loForm
.Caption = "播放多媒体文件"
.AutoCenter = .T.
.Icon=ZTB
.Show
.Windowstate=2
.alwaysontop=.t.
.minbutton=.f.
.maxbutton=.f.
ENDWITH
READ
EVENTS
ENDPROC
loForm = CREATEOBJECT("D_Form")
WITH loForm
.Caption = "DDDDDDDDDDDDD播放多媒体文件"
.AutoCenter = .T.
.Icon=ZTB
.Show
.Windowstate=2
.alwaysontop=.t.
.minbutton=.f.
.maxbutton=.f.
ENDWITH
READ
EVENTS
ENDPROC