home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 12 / CD_ASCQ_12_0294.iso / vrac / seriz10.zip / DEMO.BAS next >
BASIC Source File  |  1994-01-18  |  2KB  |  68 lines

  1. 'SerialIze Demo Application v1.0
  2. 'Copyright (C) 1992-94 Nicolas Enterprises
  3. '
  4. REM $INCLUDE: 'C:\QB45\SERIALIZ.BI'
  5.  
  6.  
  7. CONST Version$ = "1.0"
  8. CONST CompDate$ = "01/18/94"
  9. CONST ProgName$ = "SerialIze Demo"
  10.  
  11.  
  12. TrapSpec$ = "C:\QB45\DEMO.BAS"
  13.  
  14.  
  15.  
  16.  
  17. IF INSTR(COMMAND$, "/VER") THEN
  18.    PRINT " Program: "; ProgName$
  19.    PRINT " Version: "; Version$
  20.    PRINT "Compiled: "; CompDate$
  21.    END
  22. END IF
  23.  
  24. CLS
  25. PRINT ProgName$; " v"; Version$; TAB(23); CompDate$; TAB(34); "Copyright (C) 1992-94 by Nicolas Enterprises"
  26. PRINT TAB(34); "All rights reserved"
  27. PRINT
  28.  
  29. ' This prints the program header on the screen.
  30.  
  31. CALL GetRegInfo(UName$, Serial$, RegNum$, TrapSpec$)
  32.  
  33. ' This retrieved the registration info from the executable.
  34.  
  35. CALL CalcRegNum(UName$, Serial$, RegNum$, NoReg%)
  36.  
  37. ' Now the registration info is calculated.
  38.  
  39. Commd$ = LTRIM$(RTRIM$(COMMAND$))
  40.  
  41. IF Commd$ = "/REG" THEN
  42.    CALL PutRegNo(TrapSpec$)
  43. END IF
  44.  
  45. ' You can have your own way of getting to the PutRegNo Subroutine.  This
  46. ' is a simple way.  If the user includes /REG on the command line then we
  47. ' allow the user to register the program.  The PutRegNo handles its own data
  48. ' input, future versions may let the programmer do this.
  49.  
  50. IF NoReg% = -1 THEN
  51.  PRINT "UNREGISTERED USER OF APPLICATION"
  52. END IF
  53.  
  54. IF NoReg% = 0 THEN
  55.  PRINT "User Name - "; UName$
  56.  PRINT "Serial #  - "; Serial$
  57.  PRINT
  58.  PRINT "Thank you for Registering"
  59. END IF
  60.  
  61. ' If NoReg% is -1 the the program in UNREGISTERED.  If NoReg% is 0 then
  62. ' the program is registered.  You can check this latter to disable features,
  63. ' have a thank you message.  You might also want a BEG screen.
  64.  
  65.  
  66. END
  67.  
  68.