main.prg

来自「票据打印软件」· PRG 代码 · 共 77 行

PRG
77
字号
*-------------------main.prg
set talk off
set esca off
set exact off
set excl Off
SET REPROCESS TO 0
*set help to experthelp.chm
set cons on
set date ansi
set score off
set safe off
set stat bar on
set cent on
set color to 
set sysmenu off
set dele on
*SET DECIMALS TO 2
SET EXACT ON 
SET MESSAGE TO ""
*ON SHUTDOWN do quit1
set help on
clea
clear all
*ON ERROR DO err.PRG
******************************************
iniFile=ALLTRIM(GETENV("windir"))+"\syswinNumber.ini"
IF !FILE(iniFile)
   handle=FCREATE(inifile,0)
   =FPUTS(handle,"KJ",2)
  ELSE 
   handle=FOPEN(inifile,12)
ENDIF    
   =FSEEK(handle,0,0)
   syswinnumber1=FREAD(handle,2)
tempstr=""
for i=1 to 2
   tempchr=bitxor(asc(substr(syswinnumber1,i,1)),123)
   tempstr=tempstr+chr(tempchr)
endfor 
IF VAL(tempstr)>30
   QUIT 
   ELSE 
   IF VAL(tempstr)+1<10
      pp="0"+ALLTRIM(STR(VAL(tempstr)+1))
     ELSE 
      pp=ALLTRIM(STR(VAL(tempstr)+1))
   ENDIF 
*      thisform.label3.caption="本软件免费使用90次,你已经使用了"+ALLTRIM(STR(VAL(tempstr)))+"次。"
  tempstr=""
   for i=1 to 2
     tempchr=bitxor(asc(substr(pp,i,1)),123)
     tempstr=tempstr+chr(tempchr)
   endfo
   =FSEEK(handle,0,0)
   =FWRITE(handle,tempstr,2)
   =FCLOSE(handle)

ENDIF  





******************************************
PUBLIC zbd
with _screen
  .windowstate=1 
  .visible=.f.
endwith
*do form begin
*read event
do form zbd NAME zbd
read event



⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?