📄 frmlogin.frm
字号:
VERSION 5.00
Begin VB.Form frmLogin
BorderStyle = 1 'Fixed Single
Caption = "超市系统-POS登陆入口"
ClientHeight = 2910
ClientLeft = 45
ClientTop = 330
ClientWidth = 5235
Icon = "frmLogin.frx":0000
KeyPreview = -1 'True
LinkTopic = "Form1"
MaxButton = 0 'False
Picture = "frmLogin.frx":0E42
ScaleHeight = 194
ScaleMode = 3 'Pixel
ScaleWidth = 349
StartUpPosition = 2 '屏幕中心
Begin VB.TextBox Txtfield
Height = 375
Index = 1
Left = 2400
TabIndex = 4
Top = 1920
Width = 2535
End
Begin VB.TextBox Txtfield
Height = 375
Index = 0
Left = 2400
TabIndex = 0
Top = 1440
Width = 2535
End
Begin VB.Image Image1
Height = 1500
Left = 0
Picture = "frmLogin.frx":362DA
Top = 1080
Width = 1500
End
Begin VB.Label Label3
BackStyle = 0 'Transparent
Caption = "Space.进入系统 Enter换行 Esc退出 F8设置服务器"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 240
TabIndex = 3
Top = 2640
Width = 5055
End
Begin VB.Label Label2
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "密 码:"
Height = 180
Left = 1680
TabIndex = 2
Top = 1980
Width = 720
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "用户名:"
Height = 180
Left = 1680
TabIndex = 1
Top = 1500
Width = 720
End
Begin VB.Shape Shape1
BackColor = &H00FFF8F0&
BorderColor = &H00C5742F&
Height = 1335
Left = 1560
Top = 1140
Width = 3660
End
End
Attribute VB_Name = "frmLogin"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
Select Case KeyCode
Case 27
End
Case 119
frmServer.Show 1
Case 46
Case 32
Dim sp As String
sqlConnect cnMain, strSQLServer, strSQLUser, strSQLPW, strSQLDB
' OpenCn (1)
Set ef = cnMain.Execute("Select * From [User] Where username='" & txtfield(0).Text & "'")
curUserName = txtfield(0).Text
If StrComp(ef("UserName"), txtfield(0).Text, 1) = 0 And StrComp(ef("UserPW"), GetMD5(txtfield(1).Text), 1) = 0 Then
Unload Me
Form1.Show
Else
MsgBox "对不起,您的用户名或密码不正确!"
txtfield(0).Text = ""
txtfield(1).Text = ""
txtfield(0).SetFocus
End If
'cnMain.Close
End Select
End Sub
Private Sub txtField_KeyPress(Index As Integer, KeyAscii As Integer)
If KeyAscii = 13 Then
'自动下跳
If Index < 1 Then '最后一个文本框
txtfield(Index + 1).SetFocus
Else
txtfield(0).SetFocus '返回
End If
Exit Sub
End If
'判断是否为正确输入
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -