📄 frmlogin.frm
字号:
VERSION 5.00
Begin VB.Form frmlogin
BackColor = &H00FFC0C0&
Caption = "Login"
ClientHeight = 2910
ClientLeft = 60
ClientTop = 450
ClientWidth = 3600
Icon = "frmlogin.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
Picture = "frmlogin.frx":08CA
ScaleHeight = 2910
ScaleWidth = 3600
StartUpPosition = 3 'Windows Default
Begin VB.Data Data1
Caption = "Data1"
Connect = "Access"
DatabaseName = ""
DefaultCursorType= 0 'DefaultCursor
DefaultType = 2 'UseODBC
Exclusive = 0 'False
Height = 345
Left = 120
Options = 0
ReadOnly = 0 'False
RecordsetType = 1 'Dynaset
RecordSource = ""
Top = 2520
Visible = 0 'False
Width = 3375
End
Begin VB.CommandButton cmdexit
Caption = "&Exit"
Height = 495
Left = 1920
TabIndex = 5
Top = 1920
Width = 1215
End
Begin VB.CommandButton cmdlog
Caption = "&Login"
Height = 495
Left = 360
TabIndex = 4
Top = 1920
Width = 1215
End
Begin VB.TextBox txtpass
Height = 495
IMEMode = 3 'DISABLE
Left = 1920
PasswordChar = "*"
TabIndex = 3
Top = 1080
Width = 1215
End
Begin VB.TextBox txtid
Height = 495
Left = 1920
TabIndex = 2
Top = 240
Width = 1215
End
Begin VB.Label Label2
BackColor = &H00FFC0C0&
BackStyle = 0 'Transparent
Caption = "Password:"
Height = 495
Left = 360
TabIndex = 1
Top = 1200
Width = 1215
End
Begin VB.Label Label1
BackColor = &H00FFC0C0&
BackStyle = 0 'Transparent
Caption = "User ID:"
ForeColor = &H00000000&
Height = 495
Left = 360
TabIndex = 0
Top = 360
Width = 1215
End
End
Attribute VB_Name = "frmlogin"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub cmdexit_Click()
Unload Me
End Sub
Private Sub Cmdlog_Click()
If txtid.Text <> "" Then
If txtpass.Text <> "" Then
With Data1.Recordset
.FindFirst ("id = '" & txtid & "' ")
If .NoMatch = False Then
.FindFirst ("password='" & txtpass & "'")
If .NoMatch = False Then
frmopt.Show
Unload Me
Else
MsgBox " invalid password", vbExclamation
End If
Else
MsgBox "invalid user ID ", vbExclamation
End If
End With
Else
MsgBox "Please enter password!", vbExclamation
End If
Else
MsgBox "Please enter user ID!", vbExclamation
End If
End Sub
Private Sub Form_Load()
Data1.DatabaseName = App.Path & "/video.mdb"
Data1.RecordSource = " select * from user"
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -