home *** CD-ROM | disk | FTP | other *** search
/ KeyGen Studio 2002 / KeyGen_Studio_2002.iso / Tutorials / Eternal bliss / CB-EBCM8.ZIP / frmAddIn.frm (.txt) next >
Encoding:
Visual Basic Form  |  1999-07-30  |  6.7 KB  |  201 lines

  1. VERSION 5.00
  2. Begin VB.Form frmAddIn 
  3.    BackColor       =   &H00000000&
  4.    BorderStyle     =   3  'Fixed Dialog
  5.    Caption         =   "KeyGen by CyberBlade..."
  6.    ClientHeight    =   3990
  7.    ClientLeft      =   2175
  8.    ClientTop       =   1935
  9.    ClientWidth     =   4515
  10.    Icon            =   "frmAddIn.frx":0000
  11.    LinkTopic       =   "Form1"
  12.    MaxButton       =   0   'False
  13.    MinButton       =   0   'False
  14.    ScaleHeight     =   3990
  15.    ScaleWidth      =   4515
  16.    StartUpPosition =   2  'CenterScreen
  17.    Begin VB.Frame Frame3 
  18.       BackColor       =   &H80000007&
  19.       Caption         =   "_Times you clicked on the red rubers till you won_"
  20.       ForeColor       =   &H000000FF&
  21.       Height          =   855
  22.       Left            =   240
  23.       TabIndex        =   6
  24.       Top             =   1200
  25.       Width           =   3975
  26.       Begin VB.TextBox txtTimesClicked 
  27.          ForeColor       =   &H00000000&
  28.          Height          =   285
  29.          Left            =   240
  30.          TabIndex        =   7
  31.          Text            =   "13"
  32.          Top             =   360
  33.          Width           =   3495
  34.       End
  35.    End
  36.    Begin VB.CommandButton Command1 
  37.       Caption         =   "Quit"
  38.       Height          =   495
  39.       Left            =   2280
  40.       TabIndex        =   5
  41.       Top             =   3360
  42.       Width           =   1815
  43.    End
  44.    Begin VB.CommandButton cmdGenerate 
  45.       Caption         =   "Generate"
  46.       Height          =   495
  47.       Left            =   360
  48.       TabIndex        =   4
  49.       Top             =   3360
  50.       Width           =   1815
  51.    End
  52.    Begin VB.Frame Frame2 
  53.       BackColor       =   &H80000007&
  54.       Caption         =   "Serial:"
  55.       ForeColor       =   &H000000FF&
  56.       Height          =   975
  57.       Left            =   240
  58.       TabIndex        =   2
  59.       Top             =   2040
  60.       Width           =   3975
  61.       Begin VB.TextBox txtKey 
  62.          BackColor       =   &H00E0E0E0&
  63.          BeginProperty Font 
  64.             Name            =   "MS Sans Serif"
  65.             Size            =   8.25
  66.             Charset         =   0
  67.             Weight          =   400
  68.             Underline       =   0   'False
  69.             Italic          =   0   'False
  70.             Strikethrough   =   0   'False
  71.          EndProperty
  72.          ForeColor       =   &H00800000&
  73.          Height          =   375
  74.          Left            =   120
  75.          Locked          =   -1  'True
  76.          TabIndex        =   3
  77.          Text            =   "< Your serial will be displayed here >"
  78.          Top             =   480
  79.          Width           =   3735
  80.       End
  81.       Begin VB.Label Label1 
  82.          BackStyle       =   0  'Transparent
  83.          Caption         =   "Maybe the serial is very long, so check the entire box"
  84.          ForeColor       =   &H00FFFFFF&
  85.          Height          =   255
  86.          Left            =   75
  87.          TabIndex        =   8
  88.          Top             =   165
  89.          Width           =   3900
  90.       End
  91.    End
  92.    Begin VB.Frame Frame1 
  93.       BackColor       =   &H80000007&
  94.       Caption         =   "Please enter your name in the field below:"
  95.       ForeColor       =   &H000000FF&
  96.       Height          =   975
  97.       Left            =   240
  98.       TabIndex        =   0
  99.       Top             =   240
  100.       Width           =   3975
  101.       Begin VB.TextBox txtName 
  102.          ForeColor       =   &H00000000&
  103.          Height          =   375
  104.          Left            =   240
  105.          TabIndex        =   1
  106.          Text            =   "CyberBlade"
  107.          Top             =   360
  108.          Width           =   3375
  109.       End
  110.    End
  111.    Begin VB.Label Label2 
  112.       BackColor       =   &H80000012&
  113.       Caption         =   "This is a KeyGen for Eternal Bliss'   VBCrackMe 8"
  114.       BeginProperty Font 
  115.          Name            =   "MS Sans Serif"
  116.          Size            =   8.25
  117.          Charset         =   0
  118.          Weight          =   400
  119.          Underline       =   -1  'True
  120.          Italic          =   0   'False
  121.          Strikethrough   =   0   'False
  122.       EndProperty
  123.       ForeColor       =   &H0000FFFF&
  124.       Height          =   255
  125.       Left            =   0
  126.       TabIndex        =   9
  127.       Top             =   0
  128.       Width           =   4575
  129.    End
  130.    Begin VB.Line Line3 
  131.       BorderColor     =   &H00FFFFFF&
  132.       X1              =   0
  133.       X2              =   4560
  134.       Y1              =   3120
  135.       Y2              =   3120
  136.    End
  137.    Begin VB.Line Line2 
  138.       BorderColor     =   &H00FFFFFF&
  139.       X1              =   4560
  140.       X2              =   4575
  141.       Y1              =   2520
  142.       Y2              =   2535
  143.    End
  144.    Begin VB.Line Line1 
  145.       BorderColor     =   &H00E0E0E0&
  146.       BorderWidth     =   2
  147.       X1              =   4560
  148.       X2              =   4575
  149.       Y1              =   2520
  150.       Y2              =   2535
  151.    End
  152. Attribute VB_Name = "frmAddIn"
  153. Attribute VB_GlobalNameSpace = False
  154. Attribute VB_Creatable = False
  155. Attribute VB_PredeclaredId = True
  156. Attribute VB_Exposed = False
  157. Private Sub cmdGenerate_Click()
  158. Dim Key As Variant
  159. Dim Value1 As Variant, Value2 As Variant, Value3 As Variant
  160. Dim TimesClicked As Variant
  161. 'Check if the Name is valid
  162. If Len(txtName.Text) < 1 Then
  163.     MsgBox "You have to enter at least 5 characters !", vbInformation + vbOKOnly, "Error!"
  164.     Exit Sub
  165. End If
  166. If Len(txtTimesClicked.Text) < 1 Then
  167.     MsgBox "Please tell me how many times you had to click on the red rubers in order to win !", vbInformation + vbOKOnly, "Error!"
  168.     Exit Sub
  169. End If
  170. TimesClicked = txtTimesClicked.Text
  171. 'Multiply the Length of the Name by 100
  172. 'and divide the result by the number of
  173. 'times you clicked on the red rubers.
  174. 'Be sure to return an integer value.
  175. TimesClicked = Int((Len(txtName.Text) * 100) / TimesClicked)
  176. 'Add the AscII values of every second character in
  177. 'the UserName. Begin at character 1.
  178. 'example: UserName = CyberBlade
  179. 'Asc("C") + Asc("b") + Asc("r") + Asc("l") and so on...
  180. For i = 1 To Len(txtName.Text) Step 2
  181.     Value1 = Value1 + Asc(Mid(txtName, i, 1))
  182. 'Add the AscII values of every second character in
  183. 'the UserName. Begin at character 2.
  184. For i = 2 To Len(txtName.Text) Step 2
  185.     Value2 = Value2 + Asc(Mid(txtName, i, 1))
  186. Value3 = Value1 * Value2
  187. 'Divide Value3 / TimesClicked
  188. 'Be sure to return an integer value
  189. Key = Int(Value3 / TimesClicked)
  190. 'Add "0"s to the Key until the
  191. 'total Length of the Key is equal
  192. 'to the times you clicked on the red rubers
  193. For i = 1 To txtTimesClicked.Text - Len(Trim(Str(Key)))
  194.     Key = "0" & Key
  195. 'Display the Key in the TextBox
  196. txtKey.Text = Key
  197. End Sub
  198. Private Sub Command1_Click()
  199.     Unload Me
  200. End Sub
  201.