- VERSION 5.00
- Begin VB.Form Form9
- Caption = "用户管理"
- ClientHeight = 3645
- ClientLeft = 2565
- ClientTop = 2340
- ClientWidth = 4980
- LinkTopic = "Form9"
- ScaleHeight = 3645
- ScaleWidth = 4980
- Begin VB.CommandButton Command2
- Caption = "退出"
- Height = 375
- Left = 2760
- TabIndex = 7
- Top = 2760
- Width = 975
- End
- Begin VB.CommandButton Command1
- Caption = "注册"
- Height = 375
- Left = 1320
- TabIndex = 6
- Top = 2760
- Width = 1095
- End
- Begin VB.TextBox Text3
- Height = 375
- IMEMode = 3 'DISABLE
- Left = 1800
- PasswordChar = "*"
- TabIndex = 2
- Top = 2040
- Width = 1455
- End
- Begin VB.TextBox Text2
- Height = 375
- IMEMode = 3 'DISABLE
- Left = 1800
- PasswordChar = "*"
- TabIndex = 1
- Top = 1320
- Width = 1455
- End
- Begin VB.TextBox Text1
- Height = 375
- Left = 1800
- TabIndex = 0
- Top = 600
- Width = 1455
- End
- Begin VB.Label Label3
- Caption = "重复密码:"
- Height = 495
- Left = 840
- TabIndex = 5
- Top = 2160
- Width = 1095
- End
- Begin VB.Label Label2
- Caption = "密码:"
- Height = 375
- Left = 1080
- TabIndex = 4
- Top = 1440
- Width = 855
- End
- Begin VB.Label Label1
- Caption = "用户名:"
- Height = 375
- Left = 960
- TabIndex = 3
- Top = 720
- Width = 735
- End
- End
- Attribute VB_Name = "Form9"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Private Sub Command1_Click()
- Dim pubConn As New ADODB.Connection
- Dim rs As New ADODB.Recordset
- If Text1.Text <> "" And Text2.Text <> "" And Text3.Text <> "" And Text3.Text = Text2.Text Then
- pubConn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source=" & App.Path & "luojie.mdb" & ";" & "Persist Security Info=False"
- pubConn.ConnectionTimeout = 30
- pubConn.Open
- rs.CursorLocation = adUseClient
- strSQL = "select * from user11 "
- rs.Open strSQL, pubConn, adOpenDynamic, adLockOptimistic
- rs.AddNew
- rs!用户名 = Text1.Text
- rs!密码 = Text2.Text
- rs.Update
- MsgBox "注册成功!", vbExclamation + vbOKOnly, "警告"
- Form4.Hide
- Else
- m = MsgBox("错误,请重新登录", vbExclamation)
- Text1.Text = ""
- Text2.Text = ""
- Text3.Text = ""
- End If
- End Sub
- Private Sub Command2_Click()
- Unload Me
- End Sub