?? register.frm
字號:
VERSION 5.00
Begin VB.Form reg
Caption = "新用戶注冊"
ClientHeight = 3195
ClientLeft = 60
ClientTop = 345
ClientWidth = 4680
Icon = "register.frx":0000
LinkTopic = "Form1"
Picture = "register.frx":030A
ScaleHeight = 3195
ScaleWidth = 4680
StartUpPosition = 3 '窗口缺省
Begin VB.TextBox Text1
Height = 495
IMEMode = 3 'DISABLE
Index = 2
Left = 2520
PasswordChar = "*"
TabIndex = 7
Top = 1440
Width = 1575
End
Begin VB.TextBox Text1
Height = 495
IMEMode = 3 'DISABLE
Index = 1
Left = 2520
PasswordChar = "*"
TabIndex = 6
Top = 840
Width = 1575
End
Begin VB.TextBox Text1
Height = 495
Index = 0
Left = 2520
TabIndex = 5
Top = 240
Width = 1575
End
Begin VB.CommandButton Command2
Caption = "取 消"
BeginProperty Font
Name = "華文行楷"
Size = 15
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 2760
TabIndex = 1
Top = 2280
Width = 1215
End
Begin VB.CommandButton Command1
Caption = "確 認"
BeginProperty Font
Name = "華文行楷"
Size = 15.75
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 510
TabIndex = 0
Top = 2280
Width = 1215
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "重復(fù)輸密碼"
BeginProperty Font
Name = "華文新魏"
Size = 14.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H000000FF&
Height = 495
Index = 2
Left = 480
TabIndex = 4
Top = 1560
Width = 1695
End
Begin VB.Label Label1
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 = &H000000FF&
Height = 495
Index = 1
Left = 480
TabIndex = 3
Top = 960
Width = 1695
End
Begin VB.Label Label1
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 = &H000000FF&
Height = 495
Index = 0
Left = 480
TabIndex = 2
Top = 360
Width = 1935
End
End
Attribute VB_Name = "reg"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Dim txtSQL As String
Dim mrc As ADODB.Recordset
Dim MsgText As String
'VB 在線
'www.VBzx.net
' VB在線 收集整理
'+------------------------------------------------+
' http://www.VBzx.net
'+------------------------------------------------+
If Trim(text1(0).Text) = "" Then
MsgBox "請輸入用戶名稱!", vbOKOnly + vbExclamation, "警告"
Exit Sub
text1(0).SetFocus
Else
txtSQL = "select * from 用戶信息表 "
Set mrc = ExecuteSQL(txtSQL, MsgText)
While (mrc.EOF = False)
If Trim(mrc.Fields(0)) = Trim(text1(0)) Then
MsgBox "用戶已經(jīng)存在,請重新輸入用戶名!", vbOKOnly + vbExclamation, "警告"
text1(0).SetFocus
text1(0).Text = ""
text1(1).Text = ""
text1(2).Text = ""
Exit Sub
Else
mrc.MoveNext
End If
Wend
End If
If Trim(text1(1).Text) <> Trim(text1(2).Text) Then
MsgBox "兩次輸入密碼不一樣,請確認!", vbOKOnly + vbExclamation, "警告"
text1(1).SetFocus
text1(1).Text = ""
text1(2).Text = ""
Exit Sub
Else
If text1(1).Text = "" Then
MsgBox "密碼不能為空!", vbOKOnly + vbExclamation, "警告"
text1(1).SetFocus
text1(1).Text = ""
text1(2).Text = ""
Else
mrc.AddNew
mrc.Fields(0) = Trim(text1(0).Text)
mrc.Fields(1) = Trim(text1(1).Text)
mrc.Update
mrc.Close
MsgBox "添加用戶成功!", vbOKOnly + vbExclamation, "添加用戶"
Unload reg
login.Show
End If
End If
End Sub
Private Sub Command2_Click()
Unload reg
End Sub
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -