📄 frmdl.frm
字号:
VERSION 5.00
Begin VB.Form frmdl
BackColor = &H00FFFFFF&
Caption = "用户登陆(欢迎使用)"
ClientHeight = 10710
ClientLeft = 60
ClientTop = 750
ClientWidth = 15240
FillColor = &H00C0C0FF&
ForeColor = &H80000013&
LinkTopic = "Form1"
Picture = "frmdl.frx":0000
ScaleHeight = 10710
ScaleWidth = 15240
Begin VB.Frame Frame1
BackColor = &H00E0E0E0&
Caption = "登陆框"
Height = 3615
Left = 6480
TabIndex = 0
Top = 3000
Width = 3135
Begin VB.CommandButton cmdcancel
Caption = "取消"
Height = 375
Left = 1680
TabIndex = 7
Top = 2760
Width = 1095
End
Begin VB.CommandButton cmdok
BackColor = &H00E0E0E0&
Caption = "登陆"
Height = 375
Left = 240
MaskColor = &H00C0C0FF&
Picture = "frmdl.frx":00D2
TabIndex = 5
Top = 2760
Width = 1215
End
Begin VB.TextBox txtpwd
Height = 375
IMEMode = 3 'DISABLE
Left = 1680
PasswordChar = "*"
TabIndex = 4
Top = 1320
Width = 1335
End
Begin VB.TextBox txtname
Height = 375
Left = 1680
TabIndex = 2
Top = 720
Width = 1335
End
Begin VB.Label Label2
BackColor = &H00E0E0E0&
Caption = "密 码:"
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 240
TabIndex = 3
Top = 1320
Width = 1335
End
Begin VB.Label Label1
BackColor = &H00E0E0E0&
Caption = "用户名:"
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 240
TabIndex = 1
Top = 720
Width = 1215
End
End
Begin VB.Label Label3
BackColor = &H00FFFFFF&
Caption = "欢迎使用本房产中介管理系统版权所有:陈晓杰 版本:V 1.0"
ForeColor = &H00FF0000&
Height = 615
Left = 12360
TabIndex = 6
Top = 9720
Width = 2415
End
Begin VB.Menu mnufang
Caption = "房源信息(&F)"
Enabled = 0 'False
End
Begin VB.Menu mnuke
Caption = "客户信息(&K)"
Enabled = 0 'False
End
Begin VB.Menu mnujiao
Caption = "交易记录(&J)"
Enabled = 0 'False
End
Begin VB.Menu mnuxi
Caption = "系统管理(&M)"
Enabled = 0 'False
End
Begin VB.Menu mnutui
Caption = "退出系统(&Q)"
Enabled = 0 'False
End
End
Attribute VB_Name = "frmdl"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub cmdcancel_Click()
conn.Close
Set conn = Nothing
End
End Sub
Private Sub cmdok_Click()
Dim sql As String
Dim rs_login As New ADODB.Recordset
If Trim(txtname.Text) = "" Then
MsgBox "没有这个用户", vbOKOnly + vbExclamation, ""
txtname.SetFocus
Else
sql = "select * from 用户信息 where 用户名='" & txtname.Text & "'"
rs_login.Open sql, conn, adOpenKeyset, adLockPessimistic
If rs_login.EOF = True Then
MsgBox "没有这个用户", vbOKOnly + vbExclamation, ""
txtname.SetFocus
Else
If Trim(rs_login.Fields(1)) = Trim(txtpwd.Text) Then
userID = txtname.Text
username = rs_login.Fields(2)
rs_login.Close
Unload Me
frmMain.Show
Else
MsgBox "密码不正确", vbOKOnly + vbExclamation, ""
txtpwd.SetFocus
End If
End If
End If
End Sub
Private Sub Form_Load()
Dim connectionstring As String
connectionstring = "provider=Microsoft.Jet.oledb.4.0;" & _
"data source= " & App.Path & "\房产中介管理.mdb"
conn.Open connectionstring
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -