当前位置: 代码迷 >> VFP >> 为何通出不成功?该怎么解决
  详细解决方案

为何通出不成功?该怎么解决

热度:10017   发布时间:2013-02-26 00:00:00.0
为何通出不成功?
下面是一个程序的主程序,当按主窗口退出时能正常退出,当在myquit的提问中选“否”时,提示找不到程序myquit.prg

是什么原因?

SET   TALK   off
SET   DELETED   on
SET   SAFETY   off
SET   DATE   to   ansi
SET   CENTURY   on
SET   SYSMENU   off
ON   SHUTDOWN   do   myquit     //退出系统时调用自定义过程
SET   MARK   to   "- "
_screen.Caption= "µ¥Ïî½±¹ÜÀíϵͳ "
USE   bj
IF   LEN(ALLTRIM(bjtp)) <> 0
_screen.Picture   =bj.bjtp
else
_screen.Picture   = "bj.bmp "
ENDIF
USE
DO   form   pass
OPEN   DATABASE   main.dbc
PUBLIC   jjmc
jjmc=SPACE(10)
set   class   to   myclass
ap=create( "app ")
_screen.Icon   = "add.ico "
ap.mainprg
ap.close  

PROCEDURE   myquit

IF   MESSAGEBOX( "你确信要退出本系统吗 ",4+32, "提示 ")=6
CLEAR     events
CLOSE   ALL
QUIT
ENDIF



------解决方案--------------------------------------------------------
ON SHUTDOWN myquit()
  相关解决方案