📄 form2.frm
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "msadodc.ocx"
Begin VB.Form 注册用户
Caption = "注册用户"
ClientHeight = 3990
ClientLeft = 60
ClientTop = 450
ClientWidth = 4680
LinkTopic = "Form2"
ScaleHeight = 3990
ScaleWidth = 4680
StartUpPosition = 3 '窗口缺省
Begin MSAdodcLib.Adodc Adodc1
Height = 330
Left = 240
Top = 3720
Visible = 0 'False
Width = 1200
_ExtentX = 2117
_ExtentY = 582
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 8
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = "Provider=MSDASQL.1;Persist Security Info=False;Data Source=超市;Initial Catalog=超市"
OLEDBString = "Provider=MSDASQL.1;Persist Security Info=False;Data Source=超市;Initial Catalog=超市"
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
Caption = "确定"
Height = 495
Left = 600
TabIndex = 7
Top = 3120
Width = 1215
End
Begin VB.CommandButton Command1
Caption = "取消"
Height = 495
Left = 2520
TabIndex = 6
Top = 3120
Width = 1215
End
Begin VB.TextBox Text3
Height = 495
IMEMode = 3 'DISABLE
Left = 1680
PasswordChar = "*"
TabIndex = 5
Top = 2040
Width = 1455
End
Begin VB.TextBox Text2
Height = 495
IMEMode = 3 'DISABLE
Left = 1680
PasswordChar = "*"
TabIndex = 3
Top = 1320
Width = 1455
End
Begin VB.TextBox Text1
Height = 495
Left = 1680
TabIndex = 1
Top = 600
Width = 1455
End
Begin VB.Label Label3
Caption = "确认密码"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 120
TabIndex = 4
Top = 2160
Width = 1215
End
Begin VB.Label Label2
Caption = "用户密码"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 120
TabIndex = 2
Top = 1440
Width = 1215
End
Begin VB.Label Label1
Caption = "用户名"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 120
TabIndex = 0
Top = 600
Width = 1455
End
End
Attribute VB_Name = "注册用户"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Unload Me
End Sub
Private Sub Command2_Click()
Adodc1.RecordSource = "select * from 登陆"
Adodc1.Refresh
While (Adodc1.Recordset.EOF = False)
If Trim(Adodc1.Recordset.Fields(0)) = Trim(Text1.Text) Then
MsgBox ("用户名以存在,请输入新用户名!")
Text1.SetFocus
Text1.Text = ""
Text2.Text = ""
Exit Sub
Else
Adodc1.Recordset.MoveNext
End If
Wend
Adodc1.Recordset.AddNew
Adodc1.Recordset.Fields(0) = Trim(Text1.Text)
Adodc1.Recordset.Fields(1) = Trim(Text2.Text)
Adodc1.Recordset.Update
Adodc1.Recordset.Close
MsgBox ("添加用户成功!")
Text1.SetFocus
Text1.Text = ""
Text2.Text = ""
Me.Hide
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -