CLEAR ALL
CLOSE ALL
ON ERROR Do progs\errors With Program(),Lineno(),Error(),Message(),Message(1)
DECLARE LONG GetCurrentDirectory IN WIN32API LONG , STRING @
LOCAL cpath,lnstringlen
cpath = SPACE(200)+CHR(0)
lnstringlen = GETCURRENTDIRECTORY(200,@CPATH)
cpath = LEFT(CPATH,LNSTRINGLEN)
TRY
IF FILE(CPATH+"\errors.txt")
gnerrfile = FOPEN(CPATH+"\errors.txt",12)
ELSE
gnerrfile = FCREATE(CPATH+"\errors.txt")
ENDIF
IF GNERRFILE < 0
THROW "不能创建或打开输出文件!"
ELSE
= FWRITE(GNERRFILE,"软件已经启动,请不要重复启动!")
ENDIF
CATCH TO zgerror WHEN ZGERROR.errorno = 2071
= MESSAGEBOX("软件已经启动,请不要重复启动!",64,"提示信息")
QUIT
ENDTRY
DECLARE INTEGER waveOutGetNumDevs IN winmm.Dll AS APIwaveOutGetNumDevs
IF apiwaveoutgetnumdevs() <= 0
= MESSAGEBOX("本机没有配声卡,您将听不到音乐和语音报分!",64,"提示信息")
ENDIF
SET PROCEDURE TO Progs\Proc ADDITIVE
= createdbf("Name")
= publ("姓名奥秘","2007V3.0",.F.)
DO Progs\ReadReg.prg
IF LSPLASH
DO FORM Forms\Splash NAME frmsplash
ENDIF
RELEASE lsplash
IF checknewversion()
IF MESSAGEBOX("本软件已经有新版本,请到天空软件战或华军软件园下载最新版本!"+CHR(13)+CHR(13)+"注意:新版本不要安装到旧版本所在文件夹,否则可能会出错!"+CHR(13)+CHR(13)+"您要到天空软件站下载吗?",292,"请确认") = 6
= gotohomepage()
ENDIF
ENDIF
LOCAL cfrmmain
cfrmmain = mainform()
CLOSE TABLES
DO FORM (CFRMMAIN)NAME frmmain
IF LREGOK = .F.
DO FORM Forms\Sys_RegSoft
ENDIF
READ EVENTS
CLOSE ALL
CLEAR ALL
QUIT