一个顶层表单加上一个菜单再+上几个普通表单, 部分代码疑问
请问各位老师傅,,下面是最简单的案例,一个顶层表单加上一个菜单再+上几个普通表单,代码这么写可以吗? 主要是顶层表单MAIN里面Destroy 和 Unload 里面都有 clear events ,,这样是否可以?
启动PRG 文
clear all
set sysmenu off
set date to ansi
set century on
_screen.visible=.f.
do form MAIN
read events
ON SHUTDOWN do quitall.prg
set sysmenu on
clear
close all
Quitall.prg 文件
IF MESSAGEBOX("确实要退出FOXPRO 吗",4+32,"提示")=6
CLEAR EVENTS
QUIT
ENDIF
顶层表单
MAIN-- Load
do renshi.mpr with this,.t.
application.visible=.f.
MAIN-- Destroy
application.visible=.t.
clear events
MAIN -Unload
clear events
quit