dengluchuangti.frm
来自「这是我最近自己做的VB开发软件,希望各位给点意见,指点一下不足的地方.」· FRM 代码 · 共 222 行
FRM
222 行
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form 登陆
Caption = "登陆"
ClientHeight = 4410
ClientLeft = 60
ClientTop = 450
ClientWidth = 4755
LinkTopic = "Form1"
Picture = "dengluchuangti.frx":0000
ScaleHeight = 4410
ScaleWidth = 4755
StartUpPosition = 3 '窗口缺省
Begin VB.TextBox Text2
Height = 375
IMEMode = 3 'DISABLE
Left = 1800
PasswordChar = "*"
TabIndex = 6
Top = 2280
Width = 1695
End
Begin VB.TextBox Text1
Height = 375
Left = 1800
TabIndex = 5
Top = 1560
Width = 1695
End
Begin MSAdodcLib.Adodc Adodc1
Height = 375
Left = 360
Top = 3600
Visible = 0 'False
Width = 1215
_ExtentX = 2143
_ExtentY = 661
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 1
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 3
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = "DSN=售楼管理系统"
OLEDBString = ""
OLEDBFile = ""
DataSourceName = "售楼管理系统"
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = "select * from yonghu"
Caption = "Adodc1"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
Begin VB.CommandButton Command2
BackColor = &H00FFFFFF&
Caption = "退出"
Height = 375
Left = 2520
Style = 1 'Graphical
TabIndex = 4
Top = 3120
Width = 1095
End
Begin VB.CommandButton Command1
BackColor = &H00FFFFFF&
Caption = "登陆"
Height = 375
Left = 960
Style = 1 'Graphical
TabIndex = 3
Top = 3120
Width = 975
End
Begin VB.Label Label4
AutoSize = -1 'True
BackStyle = 0 'Transparent
BorderStyle = 1 'Fixed Single
Caption = "注册新用户"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00400000&
Height = 300
Left = 3000
TabIndex = 7
Top = 3720
Width = 1335
End
Begin VB.Label Label3
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "密码"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00400000&
Height = 240
Left = 840
TabIndex = 2
Top = 2280
Width = 480
End
Begin VB.Label Label2
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "用户名"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00400000&
Height = 240
Left = 720
TabIndex = 1
Top = 1560
Width = 720
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "欢迎进入售楼信息管理系统"
BeginProperty Font
Name = "隶书"
Size = 18
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00400000&
Height = 360
Left = 120
TabIndex = 0
Top = 720
Width = 4500
End
End
Attribute VB_Name = "登陆"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim micount As Integer '用于记录输入密码次数
Private Sub Command1_Click()
Dim sqlstr As String
sqlstr = "select * from yonghu where 用户名='" & Text1.Text & "'"
Adodc1.RecordSource = sqlstr
Adodc1.Refresh
If Text1.Text = "" Then '判断用户名是否为空
MsgBox "请输入用户名!", vbExclamation, "警告"
Text2.Text = ""
Text1.SetFocus
ElseIf Adodc1.Recordset.BOF Then '判断用户名是否存在
MsgBox "此用户名不存在,请重新输入!", vbExclamation, "警告"
Text1.Text = ""
Text2.Text = ""
Text1.SetFocus
ElseIf Text2.Text = "" Then '判断密码是否为空
MsgBox "请输入密码!", vbExclamation, "警告"
Text2.SetFocus
ElseIf Trim(Adodc1.Recordset.Fields("密码")) <> Text2.Text Then '判断密码是否正确
MsgBox "密码错误,请重新输入!", vbExclamation, "警告"
Text2.Text = ""
Text2.SetFocus
Else
售楼信息管理系统.Show
Unload Me
End If
micount = micount + 1
If micount = 3 Then Unload Me
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Label4_Click()
注册新用户.Show
End Sub
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?