home *** CD-ROM | disk | FTP | other *** search
/ CD Ware Multimedia 2000 February / sharewareesp1.iso / share / AppExpire / data1.cab / VBExample / codegen.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1999-11-10  |  6.9 KB  |  215 lines

  1. VERSION 5.00
  2. Object = "{6B94BFC0-C838-11D2-A9B4-0000B454B114}#1.0#0"; "APPEXP~1.OCX"
  3. Begin VB.Form CodeGenForm 
  4.    Caption         =   "AppExpire Code Generator"
  5.    ClientHeight    =   5115
  6.    ClientLeft      =   60
  7.    ClientTop       =   345
  8.    ClientWidth     =   6645
  9.    LinkTopic       =   "Form1"
  10.    ScaleHeight     =   5115
  11.    ScaleWidth      =   6645
  12.    StartUpPosition =   3  'Windows Default
  13.    Begin VB.CommandButton pbTestApp 
  14.       Caption         =   "TestApp"
  15.       Height          =   375
  16.       Left            =   120
  17.       TabIndex        =   15
  18.       Top             =   4440
  19.       Width           =   975
  20.    End
  21.    Begin VB.CommandButton pbGenRegCode 
  22.       Caption         =   "&Generate"
  23.       Height          =   375
  24.       Left            =   120
  25.       TabIndex        =   7
  26.       Top             =   2280
  27.       Width           =   1095
  28.    End
  29.    Begin VB.TextBox ebResults 
  30.       BeginProperty Font 
  31.          Name            =   "Fixedsys"
  32.          Size            =   9
  33.          Charset         =   0
  34.          Weight          =   400
  35.          Underline       =   0   'False
  36.          Italic          =   0   'False
  37.          Strikethrough   =   0   'False
  38.       EndProperty
  39.       Height          =   2535
  40.       Left            =   1440
  41.       Locked          =   -1  'True
  42.       MultiLine       =   -1  'True
  43.       TabIndex        =   14
  44.       Text            =   "codegen.frx":0000
  45.       Top             =   2280
  46.       Width           =   4935
  47.    End
  48.    Begin VB.CommandButton pbGenSerialNumber 
  49.       Caption         =   "Random &SN"
  50.       Height          =   375
  51.       Left            =   4800
  52.       TabIndex        =   13
  53.       Top             =   1800
  54.       Width           =   1215
  55.    End
  56.    Begin VB.TextBox ebSerialFormat 
  57.       Height          =   285
  58.       Left            =   4560
  59.       TabIndex        =   5
  60.       Text            =   "000000"
  61.       Top             =   1440
  62.       Width           =   1695
  63.    End
  64.    Begin VB.TextBox ebPrefix 
  65.       Height          =   285
  66.       Left            =   1440
  67.       TabIndex        =   2
  68.       Text            =   "PRE"
  69.       Top             =   480
  70.       Width           =   1335
  71.    End
  72.    Begin VB.TextBox ebSerial 
  73.       Height          =   285
  74.       Left            =   1440
  75.       TabIndex        =   4
  76.       Text            =   "000000"
  77.       Top             =   1440
  78.       Width           =   2055
  79.    End
  80.    Begin VB.TextBox ebVersion 
  81.       Height          =   285
  82.       Left            =   1440
  83.       TabIndex        =   6
  84.       Text            =   "1.99"
  85.       Top             =   1800
  86.       Width           =   1215
  87.    End
  88.    Begin VB.TextBox ebUserName 
  89.       Height          =   285
  90.       Left            =   1440
  91.       TabIndex        =   3
  92.       Text            =   "User Name"
  93.       Top             =   1080
  94.       Width           =   2415
  95.    End
  96.    Begin VB.TextBox ebDevCode 
  97.       Height          =   285
  98.       Left            =   1440
  99.       TabIndex        =   1
  100.       Text            =   "DevCode"
  101.       Top             =   120
  102.       Width           =   3135
  103.    End
  104.    Begin EXPIREOCXLib.ExpireOCX expControl 
  105.       Left            =   5280
  106.       Top             =   4680
  107.       _Version        =   65536
  108.       _ExtentX        =   661
  109.       _ExtentY        =   661
  110.       _StockProps     =   0
  111.       DeveloperCode   =   "DEMO ONLY"
  112.       EndUserName     =   "Unregistered"
  113.       ExpireOn        =   0
  114.       LastRunMonth    =   12
  115.       LastRunDay      =   31
  116.       LastRunYear     =   2035
  117.       Prefix          =   ""
  118.       RegistryCode    =   "AppExpire"
  119.       SerialNumber    =   ""
  120.       UserCode        =   ""
  121.       CurrentVersion  =   "1.00"
  122.       MaxVersion      =   "1.99"
  123.       EncryptReg      =   -1  'True
  124.       HideSN          =   0   'False
  125.    End
  126.    Begin VB.Label Label2 
  127.       Caption         =   "Developer Code:"
  128.       Height          =   255
  129.       Left            =   0
  130.       TabIndex        =   0
  131.       Top             =   120
  132.       Width           =   1335
  133.    End
  134.    Begin VB.Label Label7 
  135.       Caption         =   "Format:"
  136.       Height          =   255
  137.       Left            =   3600
  138.       TabIndex        =   12
  139.       Top             =   1440
  140.       Width           =   855
  141.    End
  142.    Begin VB.Label Label6 
  143.       Caption         =   "Product Prefix"
  144.       Height          =   255
  145.       Left            =   0
  146.       TabIndex        =   11
  147.       Top             =   480
  148.       Width           =   1215
  149.    End
  150.    Begin VB.Label Label5 
  151.       Caption         =   "Serial Number:"
  152.       Height          =   255
  153.       Left            =   0
  154.       TabIndex        =   10
  155.       Top             =   1440
  156.       Width           =   1455
  157.    End
  158.    Begin VB.Label Label4 
  159.       Caption         =   "Max Version:"
  160.       Height          =   255
  161.       Left            =   0
  162.       TabIndex        =   9
  163.       Top             =   1800
  164.       Width           =   1335
  165.    End
  166.    Begin VB.Label Label3 
  167.       Caption         =   "End User Name:"
  168.       Height          =   255
  169.       Left            =   0
  170.       TabIndex        =   8
  171.       Top             =   1080
  172.       Width           =   1335
  173.    End
  174. Attribute VB_Name = "CodeGenForm"
  175. Attribute VB_GlobalNameSpace = False
  176. Attribute VB_Creatable = False
  177. Attribute VB_PredeclaredId = True
  178. Attribute VB_Exposed = False
  179. Private Sub Command2_Click()
  180. End Sub
  181. Private Sub Form_Load()
  182.     ebDevCode.Text = GetSetting("AppCodeGen", "Parameters", "Devcode", "DevCode")
  183.     ebPrefix.Text = GetSetting("AppCodeGen", "Parameters", "Prefix", "PRE")
  184.     ebSerialFormat.Text = GetSetting("AppCodeGen", "Parameters", "Format", "000000")
  185.     ebVersion.Text = GetSetting("AppCodeGen", "Parameters", "MaxVer", "1.99")
  186. End Sub
  187. Private Sub Form_Unload(Cancel As Integer)
  188.     SaveSetting "AppCodeGen", "Parameters", "DevCode", ebDevCode.Text
  189.     SaveSetting "AppCodeGen", "Parameters", "Prefix", ebPrefix.Text
  190.     SaveSetting "AppCodeGen", "Parameters", "Format", ebSerialFormat.Text
  191.     SaveSetting "AppCodeGen", "Parameters", "MaxVer", ebVersion.Text
  192. End Sub
  193. Private Sub pbGenRegCode_Click()
  194.     Dim l1 As String, l2 As String, l3 As String, l4 As String
  195.     crlf = Chr(13) + Chr(10)
  196.     expControl.DeveloperCode = ebDevCode.Text
  197.     expControl.Prefix = ebPrefix.Text
  198.     expControl.EndUserName = ebUserName.Text
  199.     expControl.SerialNumber = ebSerial.Text
  200.     expControl.MaxVersion = ebVersion.Text
  201.     expControl.ExpireOn = 1
  202.     l1 = "User Name        :" + ebUserName.Text
  203.     l2 = "Serial Number    :" + ebSerial.Text
  204.     l3 = "Max Version      :" + ebVersion.Text
  205.     l4 = "Registration Code:" + expControl.GetGeneratedCode
  206.     ebResults.Text = l1 + crlf + l2 + crlf + l3 + crlf + l4
  207. End Sub
  208. Private Sub pbGenSerialNumber_Click()
  209.     expControl.GenerateSerialNumber (ebSerialFormat.Text)
  210.     ebSerial.Text = expControl.SerialNumber
  211. End Sub
  212. Private Sub pbTestApp_Click()
  213.    TestApp.Show
  214. End Sub
  215.