📄 用户登陆.frm
字号:
VERSION 5.00
Begin VB.Form Form11
Caption = "用户登陆"
ClientHeight = 2460
ClientLeft = 5670
ClientTop = 4680
ClientWidth = 5205
Icon = "用户登陆.frx":0000
LinkTopic = "Form11"
Picture = "用户登陆.frx":08CA
ScaleHeight = 2460
ScaleWidth = 5205
StartUpPosition = 2 '屏幕中心
Begin VB.CommandButton Command2
Caption = "取 消"
BeginProperty Font
Name = "楷体_GB2312"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 3600
TabIndex = 5
Top = 1680
Width = 975
End
Begin VB.CommandButton Command1
Caption = "确 定"
BeginProperty Font
Name = "楷体_GB2312"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 2160
TabIndex = 4
Top = 1680
Width = 975
End
Begin VB.Data Data1
Caption = "Data1"
Connect = "Access"
DatabaseName = ""
DefaultCursorType= 0 '缺省游标
DefaultType = 2 '使用 ODBC
Exclusive = 0 'False
Height = 345
Left = 2400
Options = 0
ReadOnly = 0 'False
RecordsetType = 1 'Dynaset
RecordSource = ""
Top = 1440
Visible = 0 'False
Width = 1455
End
Begin VB.TextBox Text2
Height = 270
IMEMode = 3 'DISABLE
Left = 3000
MaxLength = 8
PasswordChar = "*"
TabIndex = 3
Top = 1080
Width = 1815
End
Begin VB.TextBox Text1
Height = 270
Left = 3000
MaxLength = 8
TabIndex = 2
Top = 360
Width = 1815
End
Begin VB.Image Image1
Height = 1500
Left = 240
Picture = "用户登陆.frx":11B0A
Top = 480
Width = 1500
End
Begin VB.Label Label2
BackStyle = 0 'Transparent
Caption = "密码:"
BeginProperty Font
Name = "楷体_GB2312"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 1800
TabIndex = 1
Top = 1080
Width = 855
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "用户名:"
BeginProperty Font
Name = "楷体_GB2312"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 1800
TabIndex = 0
Top = 360
Width = 855
End
End
Attribute VB_Name = "Form11"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'Download by http://www.codefans.net
Private Sub Form_Load()
Data1.DatabaseName = App.Path + "\db.mdb"
Data1.RecordSource = "用户管理"
End Sub
Private Sub Command1_Click()
If Text1.Text = "" And Text2.Text = "" Then
MsgBox "请输入用户名和密码!"
Else
If Text1.Text = "" Then
MsgBox "你还没有输入用户名!"
Text1.SetFocus
Else
If Text2.Text = "" Then
MsgBox "你还没有输入密码!"
Text2.SetFocus
Else
Dim user As String
user = "用户名=" & "'" & Trim(Text1.Text) & "' and " + "密码=" & "'" & Trim(Text2.Text) & "'"
Data1.Recordset.FindFirst user
If Data1.Recordset.NoMatch Then
MsgBox "没有该用户,或密码错误!"
Exit Sub
Else
MDIForm1.Show
Form3.Show
Form19.Label3.Caption = Text1.Text
Unload Me
End If
End If
End If
End If
End Sub
Private Sub Command2_Click()
End
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -