请参考以下我的程序:
********************************系统主控程序*************************************************************************************
*********************************************************************************************************************************
IF SET("TALK")=="ON"
SET TALK OFF
m.gltalkison=.T.
ELSE
m.gltalkison=.F.
ENDIF
m.gntimebegin=SECO()
m.gcOldCent=SET("century")
m.gcOLdClas=SET("classlib")
m.gcOldDele=SET("delete")
m.gcOldEsca=SET("escape")
m.gcOldExac=SET("exact")
m.gcOldExcl=SET("exclusive")
m.gcOldMult=SET("multilocks")
m.gcOldProc=SET("procedure")
m.gcOldRepr=SET("reprocess")
m.gcOldSafe=SET("safety")
m.gcOldStat=SET("status bar")
m.gcOldHelp=SET("help",1)
m.gcOldReso=SYS(2005)
m.gcOldOnEr=ON("error")
RELEASE ALL EXCEPT g*
CLOSE ALL
CLEAR MENU
CLEAR POPU
CLEAR WIND
CLEAR
m.gcNameSystem="教改管理系统(客户机试用版Ver1.0.0) 长春监狱·教育改造科/软件监制:尹德勤/业务指导:王庆波 王鸿任/软件编制:孙晓清"
m.gcDefDataloc=curdir()
m.gmenu1=.F.
m.gmenu2=.F.
m.gmenu3=.F.
m.gcNameUser="administrators"
m.gcPermLevel="AAAAA"
m.gcExitMethod=""
IF m.gcPermLevel="AAAAA"
ELSE
ENDIF
IF m.gcPermLevel="AAAAA"
SET ESCAPE ON
ELSE
SET ESCAPE OFF
ON ESCAPE *
ENDIF
ON KEY LABEL F3
ON KEY LABEL F4
ON KEY LABEL F5
ON KEY LABEL F6
ON KEY LABEL F7
ON KEY LABEL F8
ON KEY LABEL F9
ON KEY LABEL F10
ON KEY LABEL F11
ON KEY LABEL F12
SET CENTURY ON
SET CLOCK STATUS
SET DELETED ON
SET EXACT OFF
SET CONSOLE ON
SET COLLATE TO "STROKE"
SET STATUS BAR ON
SET SYSMENU OFF
SET MESSAGE TO ""
SET EXCLUSIVE OFF
SET MULTILOCKS ON
SET REPROCESS TO 5
SET SAFETY OFF
SET DATE ANSI
SET TALK ON WINDOW
SET RESOURCE ON
public selectedtable
public Diretory
selectedtable=''
Diretory=sys(2003)+"\"
diretory="C:\教改管理\"
*****************************************************************
ON SHUTDOWN DO QuitAll.PRG
*****************************************************************
IF DATE()>{^2006.12.31}
MESSAGEBOX("该软件的使用期限已到,请更新版本!",0+64+0,"提示")
CLEAR EVENTS
QUIT
ENDIF
*****************************************************************
DO Form 启动表单.scx
WITH _Screen
.Visible=.T.
.Closable=.T.
.ControlBox=.T.
.MaxButton=.T.
.Movable=.T.
.ScrollBars=3
.AlwaysonTop=.F.
.Top=0
.Left=0
.WindowState=2
.Caption="教改管理系统(客户机试用版Ver1.0.0) 长春监狱·教育改造科/软件监制:尹德勤/业务指导:王庆波 王鸿任/软件编制:孙晓清"
.Icon='Icon.ico'
ENDWITH
*******************************************************************************
MODIFY WINDOWS SCREEN FONT "FoxFont",7 CLOSE TITLE m.gcNameSystem
PUSH MENU _MSYSMENU
DO Menu.mpr
DO Form 背景表单.scx
*****************************************************
clear
_screen.showtips=.t.
_screen.picture="c:\教改管理\icon\背景色s.gif"
*****************************************************************
set skip of bar 1 of 系统操作s .t.
set skip of bar 2 of 系统操作s .t.
set skip of bar 12 of 管理菜单g .t.
set skip of bar 12 of 排序查看x .t.
*****************************************************************
public gjl,_rec
gjl=0
_rec=0
*****************************************************************
READ EVENTS
POP MENU _MSYSMENU TO MASTER
SET SYSMENU TO DEFAULT
MODIFY WINDOWS SCREEN FONT "Foxfont",9 CLOSE TITLE "教改管理系统(客户机试用版Ver1.0.0) 长春监狱·教育改造科/软件监制:尹德勤/业务指导:王庆波 王鸿任/软件编制:孙晓清"
SET CENTURY &gcOldCent
SET CLASSLIB TO &gcOldClas
SET DELETED &gcOldDele
SET ESCAPE &gcOldEsca
SET EXACT &gcOldExac
SET EXCLUSIVE &gcOldExcl
SET MULTILOCKS &gcOldMult
SET PROCEDURE TO &gcOldProc
IF m.gcOldRepr <> 0
SET REPROCESS TO (gcOldRepr)
ENDIF
SET SAFETY &gcOldSafe
SET STATUS BAR &gcOldStat
IF ! EMPTY(m.gcOldHelp)
SET help to &gcOldHelp
ENDIF
IF ! EMPTY(m.gcOldReso)
SET RESOURCE TO &gcOldReso
ENDIF
IF ! EMPTY(m.gcOldOnEr)
ON error(gcOldOnEr)
ENDIF
CLOSE ALL
CLEAR MENU
CLEAR POPU
CLEAR PROG
CLEAR WIND
CLEAR
IF m.glTalkIsOn
SET TALK ON
ENDIF
CLEAR EVENTS
m.gcExitMethod="VFP"
RETURN
SET SYSMENU TO DEFAULT
SHOW MENU _MSYSMENU
QUIT
*************************************************************************************************************************
*************************************************************************************************************************