📄 超巿管理系统login.frm
字号:
VERSION 5.00
Begin VB.Form login
BorderStyle = 3 'Fixed Dialog
Caption = "超巿管理系统"
ClientHeight = 3900
ClientLeft = 45
ClientTop = 330
ClientWidth = 5145
Icon = "超巿管理系统login.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
Picture = "超巿管理系统login.frx":08CA
ScaleHeight = 3900
ScaleWidth = 5145
ShowInTaskbar = 0 'False
StartUpPosition = 2 '屏幕中心
Begin VB.CommandButton Command3
Caption = "注 册"
BeginProperty Font
Name = "华文行楷"
Size = 14.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 615
Left = 1920
TabIndex = 7
Top = 2520
Width = 1095
End
Begin VB.CommandButton Command2
Caption = "退 出"
BeginProperty Font
Name = "华文行楷"
Size = 15
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 615
Left = 3240
TabIndex = 6
Top = 2520
Width = 1095
End
Begin VB.CommandButton Command1
Caption = "登 陆"
BeginProperty Font
Name = "华文行楷"
Size = 15
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 615
Left = 630
TabIndex = 5
Top = 2520
Width = 1095
End
Begin VB.TextBox Text2
Appearance = 0 'Flat
Height = 375
IMEMode = 3 'DISABLE
Left = 1560
PasswordChar = "*"
TabIndex = 4
Top = 1680
Width = 1935
End
Begin VB.TextBox text1
Appearance = 0 'Flat
Height = 375
Index = 0
Left = 1560
TabIndex = 2
Top = 1080
Width = 1935
End
Begin VB.Label Label4
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "回车"
BeginProperty Font
Name = "华文行楷"
Size = 15.75
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H000000FF&
Height = 330
Left = 3570
TabIndex = 8
Top = 1710
Width = 660
End
Begin VB.Image Image1
Height = 240
Left = 3720
Picture = "超巿管理系统login.frx":C0058
Top = 1560
Width = 240
End
Begin VB.Label Label3
BackStyle = 0 'Transparent
Caption = "密 码:"
BeginProperty Font
Name = "隶书"
Size = 14.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 615
Left = 360
TabIndex = 3
Top = 1680
Width = 1695
End
Begin VB.Label Label2
BackStyle = 0 'Transparent
Caption = "用户名:"
BeginProperty Font
Name = "隶书"
Size = 14.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 615
Index = 0
Left = 360
TabIndex = 1
Top = 1080
Width = 1695
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "用户登陆"
BeginProperty Font
Name = "华文行楷"
Size = 15
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 1860
TabIndex = 0
Top = 570
Width = 1455
End
End
Attribute VB_Name = "login"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'VB 在线
'www.VBzx.net
' VB在线 收集整理
'+------------------------------------------------+
' http://www.VBzx.net
'+------------------------------------------------+
Private Sub Command1_Click()
Dim txtSQL As String
Dim mrc As ADODB.Recordset
Dim MsgText As String
Static miCount As Integer
'ToDo: create test for correct password
'check for correct password
UserName = ""
If Trim(text1(0).Text = "") Then
MsgBox "没有这个用户,请重新输入用户名!", vbOKOnly + vbExclamation, "警告"
text1(0).SetFocus
Else
txtSQL = "select * from 用户信息表 where 用户名 = '" & text1(0).Text & "'"
Set mrc = ExecuteSQL(txtSQL, MsgText)
If mrc.RecordCount = 0 Then
MsgBox "没有记录,是否注册一个用户", vbOKCancel, "警告!"
Exit Sub
Unload Me
reg.Show
End If
If mrc.EOF = True Then
MsgBox "没有这个用户,请重新输入用户名!", vbOKOnly + vbExclamation, "警告"
text1(0).SetFocus
Else
If Trim(mrc.Fields(1)) = Trim(Text2.Text) Then
OK = True
mrc.Close
Me.Hide
UserName = Trim(text1(0).Text)
main.Show
Else
MsgBox "输入密码不正确,请重新输入!", vbOKOnly + vbExclamation, "警告"
Text2.SetFocus
Text2.Text = ""
End If
End If
End If
miCount = miCount + 1
If miCount = 3 Then
Unload login
Unload main
Unload reg
End If
Exit Sub
End Sub
Private Sub Command2_Click()
Unload login
End Sub
Private Sub Command3_Click()
Unload login
reg.Show
End Sub
Private Sub Text2_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Call Command1_Click
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -