⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 passwd.frm

📁 Attendance Report System of student in Visual Basic and Oracle AS Backend
💻 FRM
📖 第 1 页 / 共 2 页
字号:
      Index           =   12
      Left            =   7080
      Picture         =   "PASSWD.frx":4AEE
      Top             =   3360
      Width           =   480
   End
   Begin VB.Image Image7 
      Height          =   480
      Index           =   14
      Left            =   1560
      Picture         =   "PASSWD.frx":53B8
      Top             =   5880
      Width           =   480
   End
   Begin VB.Image Image7 
      Height          =   480
      Index           =   15
      Left            =   8640
      Picture         =   "PASSWD.frx":5C82
      Top             =   1080
      Width           =   480
   End
   Begin VB.Image Image7 
      Height          =   480
      Index           =   20
      Left            =   4800
      Picture         =   "PASSWD.frx":654C
      Top             =   0
      Width           =   480
   End
   Begin VB.Image Image7 
      Height          =   480
      Index           =   29
      Left            =   12960
      Picture         =   "PASSWD.frx":6E16
      Top             =   1080
      Width           =   480
   End
   Begin VB.Image Image7 
      Height          =   480
      Index           =   30
      Left            =   12720
      Picture         =   "PASSWD.frx":76E0
      Top             =   7920
      Width           =   480
   End
   Begin VB.Image Image7 
      Height          =   480
      Index           =   31
      Left            =   6720
      Picture         =   "PASSWD.frx":7FAA
      Top             =   5520
      Width           =   480
   End
   Begin VB.Image Image7 
      Height          =   480
      Index           =   33
      Left            =   5520
      Picture         =   "PASSWD.frx":8874
      Top             =   8400
      Width           =   480
   End
   Begin VB.Image Image7 
      Height          =   480
      Index           =   35
      Left            =   13560
      Picture         =   "PASSWD.frx":913E
      Top             =   5160
      Width           =   480
   End
   Begin VB.Image Image7 
      Height          =   480
      Index           =   39
      Left            =   7440
      Picture         =   "PASSWD.frx":9A08
      Top             =   4560
      Width           =   480
   End
   Begin VB.Image Image7 
      Height          =   480
      Index           =   43
      Left            =   5400
      Picture         =   "PASSWD.frx":A2D2
      Top             =   4800
      Width           =   480
   End
   Begin VB.Image Image7 
      Height          =   480
      Index           =   2
      Left            =   8400
      Picture         =   "PASSWD.frx":AB9C
      Top             =   6120
      Width           =   480
   End
   Begin VB.Image Image1 
      Height          =   11520
      Left            =   0
      Picture         =   "PASSWD.frx":B466
      Top             =   0
      Width           =   15360
   End
End
Attribute VB_Name = "LOGIN_FORM"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False


Option Explicit



Private Declare Function Inp Lib "inpout32.dll" Alias "Inp32" (ByVal PortAddress As Integer) As Integer
Private Declare Sub Out Lib "inpout32.dll" Alias "Out32" (ByVal PortAddress As Integer, ByVal Value As Integer)
Private Declare Function waveOutGetNumDevs Lib "winmm.dll" () As Long
Const MidiFile = "Mission.mid"
Dim Path As String



Public LOGINID As Integer
Dim con As New ADODB.Connection
Dim rs As New ADODB.Recordset
Dim SQL1 As String
Dim cnt
Dim a, b, flag
Dim i, j, temp As Integer
Dim red, green, blue

Private Sub Form_Load()
Frame1.Visible = False

On Error Resume Next
Dim Path As String
Dim FileName$
Path = App.Path
If Right$(Path, 1) <> "\" Then Path = Path + "\"
Cls
Me.Show
Refresh
If waveOutGetNumDevs() Then
MMControl1.FileName = Path + MidiFile
MMControl1.Command = "Open"
MMControl1.Command = "PLAY"
End If

cnt = 0
a = Timer
On Error GoTo err
con.Open "DSN=ARS;UID=scott;PWD=tiger"
On Error GoTo err
GoTo ok
err: MsgBox err.Description
ok:
SQL1 = "select * from ARS_TEACHENTRY"
Set rs = con.Execute(SQL1)
rs.MoveFirst
Frame1.Visible = False
End Sub

Private Sub Image1_Click()
Frame1.Visible = True
End Sub



Private Sub passcmd2_Click()
con.Close
Set con = Nothing
Set rs = Nothing
End
End Sub




Private Sub Timer1_Timer()
On Error GoTo msg
red = Rnd * 255
green = Rnd * 255
blue = Rnd * 255
b = Timer
b = b - a
If b > 0.5 Or b < 10 Then
passlbl2.ForeColor = RGB(red, green, blue)
End If
If b >= 60# Then
msg:
MsgBox "Failed To Access ", vbCritical, "Attandance Report System Security"
End
a = a + b
End If

End Sub

Private Sub passcmd1_Click()
On Error GoTo msg
Dim epass, dpass As String
Dim uid As Integer
    cnt = cnt + 1
    If txt_id.Text <> "" Then
             SQL1 = "select * from ARS_TEACHENTRY"
             Set rs = con.Execute(SQL1)
             rs.MoveFirst

            While rs.EOF <> True
                If rs.Fields(0).Value = txt_id.Text Then
                        If rs.Fields(1).Value = passtxt.Text Then
                                LOGINID = txt_id.Text
                                ARS_MDI.Show
                                Unload Me
                                Exit Sub
                                
                        Else
                            MsgBox "Invalid Password", vbQuestion, "Attandance Report System Security"
                            passtxt = ""
                            Exit Sub
                            End If
                
                             
     End If

            rs.MoveNext
           Wend
         
        If rs.EOF = True Then
         MsgBox "Invalid User ID!", vbQuestion, "Attandance Report System Security"
    
    txt_id = ""
    passtxt.Text = ""
   End If
 Else
    MsgBox "Invalid User ID!", vbQuestion, "Attandance Report System Security"
    txt_id = ""
     End If
      If cnt = 3 Then
msg:
    MsgBox "Failed To Access ", vbCritical, "Attandance Report System Security"
      End
      End If

End Sub

Private Sub Timer6_Timer()

End Sub

Private Sub Timer7_Timer()
On Error Resume Next
Dim i As Integer
For i = 0 To 45
Image7(i).Visible = True
Image7(i).Move Image7(i).Left + Me.ScaleWidth * (Rnd - 0.5) / 30, Image7(i).Top + Me.ScaleHeight * (Rnd - 0.5) / 30
Next
End Sub

Private Sub txt_id_KeyPress(KeyAscii As Integer)
On Error GoTo msg
If (KeyAscii <> 8) Then
If Not (KeyAscii >= 48 And KeyAscii <= 57) Then
KeyAscii = 0
msg:
MsgBox "Only Numeric Data!", vbOKOnly, "Error Message"
End If
End If
End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -