frmMain.frm

 VERSION 5.00
Begin VB.Form frmMain
   BorderStyle     =   1  'Fixed Single
   Caption         =   "Registration Information"
   ClientHeight    =   3885
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   4365
   Icon            =   "frmMain.frx":0000
   LinkTopic       =   "Form1"
   LockControls    =   -1  'True
   MaxButton       =   0   'False
   MinButton       =   0   'False
   MouseIcon       =   "frmMain.frx":0442
   MousePointer    =   99  'Custom
   ScaleHeight     =   3885
   ScaleWidth      =   4365
   StartUpPosition =   2  'CenterScreen
   Begin VB.CommandButton countinue
      Caption         =   "&OK"
      Height          =   375
      Left            =   7080
      TabIndex        =   22
      Top             =   7320
      Width           =   975
   End
   Begin VB.CommandButton quit
      Caption         =   "&Cancel"
      Height          =   375
      Left            =   3120
      TabIndex        =   21
      Top             =   3360
      Width           =   975
   End
   Begin VB.CommandButton checkme
      Caption         =   "&OK"
      Height          =   375
      Left            =   3120
      TabIndex        =   20
      Top             =   2880
      Width           =   975
   End
   Begin VB.TextBox txtPwd
      Height          =   285
      Left            =   1800
      MaxLength       =   40
      TabIndex        =   14
      Top             =   1680
      Width           =   2055
   End
   Begin VB.TextBox txtName
      Height          =   285
      Left            =   1800
      MaxLength       =   40
      TabIndex        =   13
      Top             =   1200
      Width           =   2055
   End
   Begin VB.TextBox info
      Height          =   285
      Left            =   6000
      MaxLength       =   7
      TabIndex        =   2
      Top             =   6120
      Visible         =   0   'False
      Width           =   2295
   End
   Begin VB.TextBox Checkid
      BeginProperty Font
         Name            =   "Tahoma"
         Size            =   9.75
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   285
      IMEMode         =   3  'DISABLE
      Left            =   1800
      MaxLength       =   13
      TabIndex        =   1
      Top             =   2160
      Width           =   2055
   End
   Begin VB.Label Label18
      Caption         =   "Version 1.0      "
      BeginProperty Font
         Name            =   "Tahoma"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   120
      TabIndex        =   29
      Top             =   3570
      Width           =   975
   End
   Begin VB.Line Line12
      BorderColor     =   &H00FFFFFF&
      X1              =   120
      X2              =   4080
      Y1              =   2650
      Y2              =   2650
   End
   Begin VB.Line Line11
      BorderColor     =   &H00808080&
      X1              =   120
      X2              =   4080
      Y1              =   2640
      Y2              =   2640
   End
   Begin VB.Label Label15
      Caption         =   "Severe civil and penalties under law"
      BeginProperty Font
         Name            =   "Tahoma"
         Size            =   6.75
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   120
      TabIndex        =   28
      Top             =   3380
      Width           =   2415
   End
   Begin VB.Label Label14
      Caption         =   "Reproduction of this program may result in "
      BeginProperty Font
         Name            =   "Tahoma"
         Size            =   6.75
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   120
      TabIndex        =   27
      Top             =   3200
      Width           =   2775
   End
   Begin VB.Label Label13
      Caption         =   "Law and international treaties unauthorized"
      BeginProperty Font
         Name            =   "Tahoma"
         Size            =   6.75
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   120
      TabIndex        =   26
      Top             =   3020
      Width           =   2775
   End
   Begin VB.Label Label12
      Caption         =   "Warning : This program protected by copyright"
      BeginProperty Font
         Name            =   "Tahoma"
         Size            =   6.75
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   120
      TabIndex        =   25
      Top             =   2840
      Width           =   2895
   End
   Begin VB.Line Line10
      BorderColor     =   &H00FFFFFF&
      X1              =   4080
      X2              =   3840
      Y1              =   2520
      Y2              =   2520
   End
   Begin VB.Line Line9
      BorderColor     =   &H00FFFFFF&
      X1              =   4080
      X2              =   4080
      Y1              =   1080
      Y2              =   2520
   End
   Begin VB.Line Line8
      BorderColor     =   &H00808080&
      X1              =   240
      X2              =   240
      Y1              =   1080
      Y2              =   2520
   End
   Begin VB.Line Line7
      BorderColor     =   &H00808080&
      X1              =   240
      X2              =   4080
      Y1              =   1080
      Y2              =   1080
   End
   Begin VB.Line Line6
      BorderColor     =   &H00FFFFFF&
      X1              =   240
      X2              =   4080
      Y1              =   2520
      Y2              =   2520
   End
   Begin VB.Label Label17
      Caption         =   "Please enter user name, company and serial key"
      BeginProperty Font
         Name            =   "Tahoma"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   360
      TabIndex        =   24
      Top             =   720
      Width           =   3855
   End
   Begin VB.Label Label16
      Caption         =   "You must enter required information for registration "
      BeginProperty Font
         Name            =   "Tahoma"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   360
      TabIndex        =   23
      Top             =   480
      Width           =   3855
   End
   Begin VB.Label Label4
      Caption         =   "Registration Form"
      BeginProperty Font
         Name            =   "Tahoma"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   1440
      TabIndex        =   19
      Top             =   120
      Width           =   1815
   End
   Begin VB.Label Label11
      Caption         =   "Enter Name and Company For Registration"
      Height          =   255
      Left            =   6840
      TabIndex        =   18
      Top             =   7320
      Width           =   3015
   End
   Begin VB.Label Label10
      Caption         =   "Serial Key"
      BeginProperty Font
         Name            =   "Tahoma"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00000000&
      Height          =   255
      Left            =   480
      TabIndex        =   17
      Top             =   2160
      Width           =   1095
   End
   Begin VB.Label Label9
      Caption         =   "Company"
      BeginProperty Font
         Name            =   "Tahoma"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00000000&
      Height          =   255
      Left            =   480
      TabIndex        =   16
      Top             =   1680
      Width           =   975
   End
   Begin VB.Label Label8
      Caption         =   "User Name"
      BeginProperty Font
         Name            =   "Tahoma"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00000000&
      Height          =   255
      Left            =   480
      TabIndex        =   15
      Top             =   1200
      Width           =   1215
   End
   Begin VB.Line Line5
      BorderColor     =   &H00FFFFFF&
      X1              =   7680
      X2              =   7560
      Y1              =   6000
      Y2              =   6000
   End
   Begin VB.Line Line4
      BorderColor     =   &H00FFFFFF&
      X1              =   7680
      X2              =   7680
      Y1              =   5520
      Y2              =   6000
   End
   Begin VB.Line Line3
      BorderColor     =   &H00404040&
      X1              =   5160
      X2              =   5160
      Y1              =   5520
      Y2              =   6000
   End
   Begin VB.Line Line2
      BorderColor     =   &H00808080&
      X1              =   5160
      X2              =   7680
      Y1              =   5520
      Y2              =   5520
   End
   Begin VB.Line Line1
      BorderColor     =   &H00FFFFFF&
      X1              =   5160
      X2              =   7680
      Y1              =   6000
      Y2              =   6000
   End
   Begin VB.Label Label7
      Caption         =   "Capture Registration Information"
      Height          =   255
      Left            =   5280
      TabIndex        =   12
      Top             =   5640
      Width           =   2295
   End
   Begin VB.Label timeup
      BackColor       =   &H00E0E0E0&
      Height          =   255
      Left            =   6000
      TabIndex        =   11
      Top             =   7680
      Visible         =   0   'False
      Width           =   2775
   End
   Begin VB.Label paidfor
      BackColor       =   &H00E0E0E0&
      Height          =   255
      Left            =   6000
      TabIndex        =   10
      Top             =   8040
      Visible         =   0   'False
      Width           =   3135
   End
   Begin VB.Label Label5
      Caption         =   "When Expired"
      ForeColor       =   &H00B5542F&
      Height          =   255
      Left            =   4560
      TabIndex        =   9
      Top             =   7680
      Visible         =   0   'False
      Width           =   1335
   End
   Begin VB.Label Label6
      Caption         =   "When Registed"
      ForeColor       =   &H00B5542F&
      Height          =   255
      Left            =   4560
      TabIndex        =   8
      Top             =   8040
      Visible         =   0   'False
      Width           =   1215
   End
   Begin VB.Label Label3
      Caption         =   "Data"
      ForeColor       =   &H00B5542F&
      Height          =   255
      Left            =   4560
      TabIndex        =   7
      Top             =   6120
      Visible         =   0   'False
      Width           =   615
   End
   Begin VB.Label Label2
      Caption         =   "Current Id Code:"
      ForeColor       =   &H00B5542F&
      Height          =   255
      Left            =   4560
      TabIndex        =   6
      Top             =   6960
      Visible         =   0   'False
      Width           =   1215
   End
   Begin VB.Label code
      BackColor       =   &H00E0E0E0&
      Height          =   255
      Left            =   6000
      TabIndex        =   5
      Top             =   6960
      Visible         =   0   'False
      Width           =   2415
   End
   Begin VB.Label Label1
      Caption         =   "Location :"
      ForeColor       =   &H00B5542F&
      Height          =   255
      Left            =   4560
      TabIndex        =   4
      Top             =   6600
      Visible         =   0   'False
      Width           =   735
   End
   Begin VB.Label location
      BackColor       =   &H00E0E0E0&
      Height          =   255
      Left            =   6000
      TabIndex        =   3
      Top             =   6600
      Visible         =   0   'False
      Width           =   2415
   End
   Begin VB.Label lblDay
      AutoSize        =   -1  'True
      Caption         =   "Date Check is checking for date......"
      Height          =   315
      Left            =   6600
      TabIndex        =   0
      Top             =   7200
      Width           =   2565
   End
End
Attribute VB_Name = "frmMain"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'---------------------------------------------
Dim lbAppName As String
Dim lpFileName As String
Dim sHsUserNameKey As String
Dim sHsUserNameValue As String
Dim sHsPwdKey As String
Dim sHsPwdVal As String
Dim StatusUser As String
Dim StatusPasword As String
Dim file As String
Option Explicit
Private Sub checkme_Click()

'If User Click On Registered Command it Capture That They Entered Something'
'======================================================='
If txtName.Text = "" Then
MsgBox "Enter Your Name", vbInformation, "Enter Name"
Else
If txtPwd.Text = "" Then
MsgBox "Enter Your Company Name", vbInformation, "Enter Company Name"
Else

If Checkid.Text = "" Then
MsgBox "Enter Serial Key", vbInformation, "Enter Serial key"
Else
If Checkid.Text = code.Caption Then
Checkid.Enabled = False
Checkid.PasswordChar = ""
countinue.Enabled = True
file = "c:\windows\system\RegInfo.ini" '(Where File Load After Save Setting By User'
lbAppName = "Set"
sHsUserNameKey = "User"
sHsUserNameValue = txtName.Text
sHsPwdKey = "Pass" '(Company Name)
sHsPwdVal = txtPwd.Text
lpFileName = file
'========================================================'
StatusUser = WritePrivateProfileString(lbAppName, sHsUserNameKey, sHsUserNameValue, lpFileName)
StatusPasword = WritePrivateProfileString(lbAppName, sHsPwdKey, sHsPwdVal, lpFileName)
splash.Show
Unload Me
'======================================================='
Dim F As Integer
F = FreeFile
Open location.Caption For Output As F
        Print #F, paidfor.Caption ' Fill up system
    Close #F
   
Exit Sub
Else
Dim no As Integer
'========================================================'
'If Key Is Not Valid It Will Show Form(Error Form) With What Key Enter By User'
'========================================================'
Error.Show
Error.Label1.Caption = Checkid.Text '(It Capture User Key and Load To Error Form '
Checkid.Text = ""
Exit Sub
End If
End If
End If
End If
End Sub

Private Sub Form_Load()
FlatBorder Checkid.hwnd
FlatBorder txtName.hwnd
FlatBorder txtPwd.hwnd
Dim GetUser As Long
Dim GetPassword As Long

Dim temp1 As String * 50
Dim temp2 As String * 50
Dim sHsUser As String, sHsPassword As String, _
                                       lpDefault As String
file = "c:\windows\system\RegInfo.ini" ' file name
lbAppName = "Set"
sHsUser = "User"
sHsPassword = "Pass"
lpDefault = Empty
lpFileName = file

GetUser = GetPrivateProfileString(lbAppName, sHsUser, lpDefault, temp1, Len(temp1), lpFileName)
GetPassword = GetPrivateProfileString(lbAppName, sHsPassword, lpDefault, temp2, Len(temp2), lpFileName)
txtName.Text = temp1 'Place the retrieved temp1 value in txtName
txtPwd.Text = temp2 'Place the retrieved temp2 value in txtPassword
'========================================================='
On Error GoTo errorhandel
location.Caption = "C:\windows\System\RegSys.dll" 'file which stores dates
code.Caption = "11111" '(I add Five Digit Serial Key You Can Add YourSelf
info.MaxLength = "8" '(This must be the same as the registerd or unregistered sting
Checkid.PasswordChar = "*"
paidfor.Caption = "Registed"
'On Error GoTo Storeit ' If No File Then Go to Error
'========================================================='
Dim F As Integer, Text As String, d As Date, i As Integer, SDate As Date, ODate As Date
F = FreeFile
Open location.Caption For Input As F
     Text = Input(LOF(F), #F)
     info.Text = Text
    Close #F
If info.Text = paidfor.Caption Then Call registered: Exit Sub
    Open location.Caption For Output As F
    Close #F
    Exit Sub
errorhandel:
Select Case Err.Number
        Case 53 ' File not found
            Call storeit
        Case 55 ' File open
        Close #F
        Case 62
If info.Text = paidfor.Caption Then Call registered: Exit Sub
        Case 5
        Case 13
        Case Else
       
            Dim unknowen As Integer
            unknowen = MsgBox("Unknown error occured this maybe due to date tampering", vbCritical + vbOKOnly, "Unknowen error")
           
'===================== End Function ====================='
End Select
End Sub

Private Sub quit_Click()
End
End Sub
'After Serial Key  Entered Then Function
'========================================================'
Private Sub registered()
splash.Show 'Splash Screen Show'
Unload Me
End Sub
Private Sub storeit()
countinue.Enabled = True
Dim F As Integer, Text As String, d As Date, i As Integer, SDate As Date, ODate As Date
F = FreeFile
    Open location.Caption For Output As F
     
    Close #F
'===================== End Function ====================='
End Sub

Private Sub txtName_GotFocus()
txtName.BackColor = &HF1EFF0
End Sub

Private Sub txtName_LostFocus()
txtName.BackColor = vbWindowBackground
End Sub
Private Sub txtPwd_GotFocus()
txtPwd.BackColor = &HF1EFF0
End Sub
Private Sub txtPwd_LostFocus()
txtPwd.BackColor = vbWindowBackground
End Sub
Private Sub Checkid_GotFocus()
Checkid.BackColor = &HF1EFF0
End Sub
Private Sub Checkid_LostFocus()
Checkid.BackColor = vbWindowBackground
End Sub

Project Homepage: