📄 form3.frm
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form Form3
Caption = "Form3"
ClientHeight = 4065
ClientLeft = 60
ClientTop = 450
ClientWidth = 4335
LinkTopic = "Form3"
Picture = "Form3.frx":0000
ScaleHeight = 4065
ScaleWidth = 4335
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command2
BackColor = &H00FFFFFF&
Caption = "返回"
Height = 375
Left = 2160
Style = 1 'Graphical
TabIndex = 8
Top = 3000
Width = 1215
End
Begin VB.CommandButton Command1
BackColor = &H00FFFFFF&
Caption = "确认"
Height = 375
Left = 360
Style = 1 'Graphical
TabIndex = 7
Top = 3000
Width = 1095
End
Begin VB.TextBox Text3
Height = 375
Left = 1560
TabIndex = 6
Top = 2160
Width = 2055
End
Begin VB.TextBox Text2
Height = 375
Left = 1560
TabIndex = 5
Top = 1560
Width = 2055
End
Begin VB.TextBox Text1
Height = 375
Left = 1560
TabIndex = 2
Top = 960
Width = 2055
End
Begin MSAdodcLib.Adodc Adodc1
Height = 375
Left = 1200
Top = 3480
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.Label Label4
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "确认密码"
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00400000&
Height = 285
Left = 240
TabIndex = 4
Top = 2280
Width = 1200
End
Begin VB.Label Label3
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "密码"
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00400000&
Height = 285
Left = 360
TabIndex = 3
Top = 1680
Width = 600
End
Begin VB.Label Label2
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "用户名"
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00400000&
Height = 285
Left = 240
TabIndex = 1
Top = 1080
Width = 900
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 = &H00404000&
Height = 360
Left = 1320
TabIndex = 0
Top = 240
Width = 1875
End
End
Attribute VB_Name = "Form3"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
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 = ""
Text3.Text = ""
Text1.SetFocus
ElseIf Adodc1.Recordset.EOF = False Then '判断输入的用户名是否已存在
MsgBox "此用户名已存在,请重新输入!", vbExclamation, "警告"
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text1.SetFocus
ElseIf Text2.Text = "" Then '判断密码是否为空
MsgBox "请输入密码!", vbExclamation, "警告"
Text3.Text = ""
Text2.SetFocus
ElseIf Text3.Text = "" Then '判断确认密码是否为空
MsgBox "请输入确认密码!", vbExclamation, "警告"
Text3.SetFocus
ElseIf Text2.Text <> Text3.Text Then '判断二次密码输入是否一致
MsgBox "两次输入的密码不一致,请重新输入!", vbExclamation, "警告"
Text2.Text = "": Text3.Text = ""
Text2.SetFocus
Else
Adodc1.Recordset.AddNew
Adodc1.Recordset.Fields("用户名") = Text1.Text
Adodc1.Recordset.Fields("密码") = Text2.Text
Adodc1.Recordset.Update
MsgBox "注册新用户成功,请登录!", vbInformation, "注册成功"
售楼信息管理系统.Show
Unload 注册新用户
Unload Me
End If
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -