caz.frm

 VERSION 5.00
Begin VB.Form Form1
   BackColor       =   &H00FF8080&
   BorderStyle     =   0  'None
   Caption         =   "Form1"
   ClientHeight    =   11265
   ClientLeft      =   0
   ClientTop       =   -120
   ClientWidth     =   15360
   LinkTopic       =   "Form1"
   ScaleHeight     =   11265
   ScaleWidth      =   15360
   ShowInTaskbar   =   0   'False
   Begin VB.CommandButton Command3
      BackColor       =   &H00FFC0C0&
      Caption         =   "CLICK TO START"
      BeginProperty Font
         Name            =   "Bookman Old Style"
         Size            =   14.25
         Charset         =   0
         Weight          =   600
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   735
      Left            =   5160
      Style           =   1  'Graphical
      TabIndex        =   15
      Top             =   5520
      Width           =   5175
   End
   Begin VB.PictureBox Picture1
      BackColor       =   &H00000000&
      BorderStyle     =   0  'None
      Height          =   1575
      Left            =   -240
      ScaleHeight     =   1575
      ScaleWidth      =   16215
      TabIndex        =   12
      Top             =   9720
      Width           =   16215
   End
   Begin VB.PictureBox Picture2
      BackColor       =   &H00000000&
      BorderStyle     =   0  'None
      Height          =   1575
      Left            =   0
      ScaleHeight     =   1575
      ScaleWidth      =   15375
      TabIndex        =   11
      Top             =   0
      Width           =   15375
      Begin VB.Timer Timer2
         Left            =   840
         Top             =   840
      End
      Begin VB.Timer Timer1
         Left            =   360
         Top             =   840
      End
   End
   Begin VB.Frame Frame4
      BackColor       =   &H00C0C000&
      BorderStyle     =   0  'None
      Height          =   9375
      Left            =   7800
      TabIndex        =   14
      Top             =   720
      Width           =   7575
   End
   Begin VB.Frame Frame3
      BackColor       =   &H00C0C000&
      BorderStyle     =   0  'None
      Height          =   9375
      Left            =   0
      TabIndex        =   13
      Top             =   720
      Width           =   7815
   End
   Begin VB.Frame Frame2
      BackColor       =   &H00FF8080&
      Height          =   2655
      Left            =   600
      TabIndex        =   8
      Top             =   2280
      Width           =   14175
      Begin VB.Label Label4
         Alignment       =   2  'Center
         BackColor       =   &H00FF8080&
         Caption         =   "IATEC COMPUTER COLLEGE"
         BeginProperty Font
            Name            =   "Bookman Old Style"
            Size            =   39.75
            Charset         =   0
            Weight          =   600
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00008000&
         Height          =   975
         Left            =   120
         TabIndex        =   9
         Top             =   1320
         Width           =   13935
      End
      Begin VB.Label Label5
         Alignment       =   2  'Center
         BackColor       =   &H00FF8080&
         Caption         =   "AUTOMATED MATRICULATION OF"
         BeginProperty Font
            Name            =   "Bookman Old Style"
            Size            =   36
            Charset         =   0
            Weight          =   600
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00008000&
         Height          =   975
         Left            =   120
         TabIndex        =   10
         Top             =   600
         Width           =   13935
      End
   End
   Begin VB.Frame Frame1
      BackColor       =   &H00C0C000&
      BorderStyle     =   0  'None
      Height          =   3615
      Left            =   3240
      TabIndex        =   0
      Top             =   5400
      Width           =   9255
      Begin VB.CommandButton Command2
         BackColor       =   &H00FFC0C0&
         Caption         =   "CLOSE"
         BeginProperty Font
            Name            =   "Bookman Old Style"
            Size            =   14.25
            Charset         =   0
            Weight          =   600
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   495
         Left            =   4800
         Style           =   1  'Graphical
         TabIndex        =   7
         Top             =   2640
         Width           =   3615
      End
      Begin VB.CommandButton Command1
         BackColor       =   &H00FFC0C0&
         Caption         =   "OK"
         BeginProperty Font
            Name            =   "Bookman Old Style"
            Size            =   14.25
            Charset         =   0
            Weight          =   600
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   495
         Left            =   840
         Style           =   1  'Graphical
         TabIndex        =   6
         Top             =   2640
         Width           =   3615
      End
      Begin VB.TextBox Text2
         Alignment       =   2  'Center
         BackColor       =   &H00FFFF80&
         BorderStyle     =   0  'None
         BeginProperty Font
            Name            =   "Bookman Old Style"
            Size            =   14.25
            Charset         =   0
            Weight          =   600
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   405
         IMEMode         =   3  'DISABLE
         Left            =   3720
         PasswordChar    =   "*"
         TabIndex        =   4
         Top             =   1920
         Width           =   4695
      End
      Begin VB.TextBox Text1
         Alignment       =   2  'Center
         BackColor       =   &H00FFFF80&
         BorderStyle     =   0  'None
         BeginProperty Font
            Name            =   "Bookman Old Style"
            Size            =   14.25
            Charset         =   0
            Weight          =   600
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   405
         Left            =   3720
         TabIndex        =   3
         Top             =   1320
         Width           =   4695
      End
      Begin VB.Label Label3
         Alignment       =   2  'Center
         BackColor       =   &H00FFFFC0&
         Caption         =   "SECURITY PASSWORD"
         BeginProperty Font
            Name            =   "Bookman Old Style"
            Size            =   21.75
            Charset         =   0
            Weight          =   600
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00C00000&
         Height          =   495
         Left            =   840
         TabIndex        =   5
         Top             =   600
         Width           =   7575
      End
      Begin VB.Label Label2
         BackColor       =   &H00004000&
         BackStyle       =   0  'Transparent
         Caption         =   "PASSWORD :"
         BeginProperty Font
            Name            =   "Bookman Old Style"
            Size            =   18
            Charset         =   0
            Weight          =   600
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00FF0000&
         Height          =   495
         Left            =   840
         TabIndex        =   2
         Top             =   1920
         Width           =   2535
      End
      Begin VB.Label Label1
         BackColor       =   &H00004000&
         BackStyle       =   0  'Transparent
         Caption         =   "USER NAME :"
         BeginProperty Font
            Name            =   "Bookman Old Style"
            Size            =   18
            Charset         =   0
            Weight          =   600
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00C00000&
         Height          =   495
         Left            =   840
         TabIndex        =   1
         Top             =   1320
         Width           =   2655
      End
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Public LoginSucceeded As Boolean

Private Sub Command2_Click()
       'set the global var to false
    'to denote a failed login
    LoginSucceeded = False
   End
End Sub

Private Sub Command1_Click()
    'check for correct password
    If Text1.Text = "ernelch7" Or Text2.Text = "prayer" Then
        LoginSucceeded = True
        Call Form2.Show
        Me.Hide
    Else
        MsgBox "INVALID PASSWORD... PLEASE.. TRY AGAIN...", , "Login"
        Text1.Text = ""
        Text2.Text = ""
        Text1.SetFocus
        SendKeys "{Home}+{End}"
    End If
End Sub

Private Sub Command3_Click()
Timer1.Interval = 1
Timer2.Interval = 1
Command3.Visible = False
End Sub


Private Sub Timer1_Timer()
Frame4.Left = Frame4.Left + 100
If Frame4.Left >= 5300 Then
Timer1.Enabled = False
Timer2.Enabled = True
End If
End Sub

Private Sub Timer2_Timer()
Frame3.Left = Frame3.Left - 100
If Frame3.Left <= 0 Then
Timer1.Enabled = True
Timer2.Enabled = False
End If
End Sub

Project Homepage: