📄 conndb.frm
字号:
VERSION 5.00
Begin VB.Form Form1
AutoRedraw = -1 'True
BorderStyle = 1 'Fixed Single
Caption = "用户登陆"
ClientHeight = 3540
ClientLeft = 45
ClientTop = 330
ClientWidth = 5160
LinkTopic = "Form1"
MaxButton = 0 'False
Picture = "conndb.frx":0000
ScaleHeight = 3540
ScaleWidth = 5160
StartUpPosition = 3 '窗口缺省
Begin VB.TextBox Text1
Appearance = 0 'Flat
BackColor = &H00E0E0E0&
Height = 270
Left = 2280
TabIndex = 0
Top = 1320
Width = 1095
End
Begin VB.TextBox Text2
Appearance = 0 'Flat
BackColor = &H00E0E0E0&
Height = 270
IMEMode = 3 'DISABLE
Left = 2280
PasswordChar = "*"
TabIndex = 1
Top = 1920
Width = 1095
End
Begin VB.CommandButton Command1
Caption = "确定"
Height = 375
Left = 1320
Picture = "conndb.frx":A520
Style = 1 'Graphical
TabIndex = 2
Top = 2520
Width = 1095
End
Begin VB.CommandButton Command2
Caption = "退出"
Height = 375
Left = 2640
Picture = "conndb.frx":CD80
Style = 1 'Graphical
TabIndex = 3
Top = 2520
Width = 1095
End
Begin VB.Label Label2
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "账号"
Height = 180
Left = 1440
TabIndex = 5
Top = 1440
Width = 360
End
Begin VB.Label Label3
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "口令"
Height = 180
Left = 1440
TabIndex = 4
Top = 2040
Width = 360
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Dim sql As String
username = Replace(Trim(Text1.Text), "'", "''")
password = Replace(Trim(Text2.Text), "'", "''")
sql = "select * from person where username='" & username & "'" & " and password='" & password & "'"
opendb sql, ""
If rs.EOF Then
MsgBox "没有这个用户", 16, "提示"
Text1.Text = ""
Text2.Text = ""
Else
level = rs("level")
money = rs("money")
name1 = rs("name")
Unload Me
Load MDIForm1
MDIForm1.Show
End If
closedb
End Sub
Private Sub Command2_Click()
End
End Sub
Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Call Command1_Click
End If
End Sub
Private Sub Text2_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Call Command1_Click
End If
End Sub
Private Sub Form_Load()
sql = "select * from setf "
opendb sql, ""
setflag = rs("setflag")
fine = rs("fine")
bookday = rs("bookday")
booktotal = rs("booktotal")
closedb
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -