📄 zhucechuangti.frm
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form zhucechuangti
Caption = "注册新用户"
ClientHeight = 4575
ClientLeft = 60
ClientTop = 450
ClientWidth = 4290
FillStyle = 0 'Solid
LinkTopic = "Form1"
Picture = "zhucechuangti.frx":0000
ScaleHeight = 4575
ScaleWidth = 4290
StartUpPosition = 3 '窗口缺省
Begin MSAdodcLib.Adodc Adodc1
Height = 375
Left = 1440
Top = 4200
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 系统信息表"
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 = &H00FFFFC0&
Caption = "返回"
Height = 375
Left = 2280
Style = 1 'Graphical
TabIndex = 8
Top = 3600
Width = 1215
End
Begin VB.CommandButton Command1
BackColor = &H00FFFFC0&
Caption = "确认"
Height = 375
Left = 840
Style = 1 'Graphical
TabIndex = 7
Top = 3600
Width = 1095
End
Begin VB.TextBox Text3
Height = 375
Left = 2040
TabIndex = 6
Top = 2760
Width = 2055
End
Begin VB.TextBox Text2
Height = 375
Left = 2040
TabIndex = 5
Top = 2280
Width = 2055
End
Begin VB.TextBox Text1
Height = 375
Left = 2040
TabIndex = 4
Top = 1800
Width = 2055
End
Begin VB.Label Label4
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "确认密码"
ForeColor = &H00808000&
Height = 180
Left = 600
TabIndex = 3
Top = 2760
Width = 720
End
Begin VB.Label Label3
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "密码"
ForeColor = &H00808000&
Height = 180
Left = 600
TabIndex = 2
Top = 2400
Width = 360
End
Begin VB.Label Label2
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "用户名"
ForeColor = &H00808000&
Height = 180
Left = 600
TabIndex = 1
Top = 1920
Width = 540
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "注册新用户"
BeginProperty Font
Name = "华文彩云"
Size = 18
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00404000&
Height = 360
Left = 1200
TabIndex = 0
Top = 720
Width = 1800
End
End
Attribute VB_Name = "zhucechuangti"
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 系统信息表 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, "注册成功"
dengluchuangti.Show
Unload zhuchuangti
Unload Me
End If
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -