?? frmadduser.frm
字號(hào):
VERSION 5.00
Begin VB.Form frmAdduser
Caption = "添加用戶"
ClientHeight = 3360
ClientLeft = 45
ClientTop = 345
ClientWidth = 3870
LinkTopic = "Form1"
MDIChild = -1 'True
ScaleHeight = 3360
ScaleWidth = 3870
Begin VB.CommandButton cmdCancel
Caption = "取消"
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 492
Left = 1920
TabIndex = 7
Top = 2520
Width = 972
End
Begin VB.CommandButton cmdOK
Caption = "確認(rèn)"
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 492
Left = 600
TabIndex = 6
Top = 2520
Width = 972
End
Begin VB.TextBox Text1
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 492
IMEMode = 3 'DISABLE
Index = 2
Left = 1680
PasswordChar = "*"
TabIndex = 3
Top = 1800
Width = 1572
End
Begin VB.TextBox Text1
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 492
IMEMode = 3 'DISABLE
Index = 1
Left = 1680
PasswordChar = "*"
TabIndex = 2
Top = 1080
Width = 1572
End
Begin VB.TextBox Text1
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 492
Index = 0
Left = 1680
TabIndex = 0
Top = 360
Width = 1572
End
Begin VB.Label Label3
Caption = "請(qǐng)確認(rèn)密碼"
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 372
Left = 120
TabIndex = 5
Top = 1800
Width = 1452
End
Begin VB.Label Label2
Caption = "請(qǐng)輸入密碼"
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 372
Left = 120
TabIndex = 4
Top = 1080
Width = 1332
End
Begin VB.Label Label1
Caption = "請(qǐng)輸入用戶名"
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 372
Left = 120
TabIndex = 1
Top = 480
Width = 1452
End
End
Attribute VB_Name = "frmAdduser"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub cmdCancel_Click()
Unload Me
End Sub
Private Sub cmdok_Click()
Dim add_user As user
If Trim(Text1(0).Text) = "" Then
MsgBox "請(qǐng)輸入用戶名稱!", vbOKOnly + vbExclamation, "警告"
Exit Sub
Text1(0).SetFocus
Else
Set add_user = New user
add_user.user_Id = Trim(Text1(0).Text)
add_user.query
If add_user.State = 1 Then
MsgBox "用戶已經(jīng)存在,請(qǐng)重新輸入用戶名!", vbOKOnly + vbExclamation, "警告"
Text1(0).SetFocus
Text1(0).Text = ""
Text1(1).Text = ""
Text1(2).Text = ""
Exit Sub
End If
If add_user.State = 2 Then 'no user exist
If Trim(Text1(1).Text) <> Trim(Text1(2).Text) Then
MsgBox "兩次輸入密碼不一樣,請(qǐng)確認(rèn)!", 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
add_user.user_pwd = Trim(Text1(1).Text)
add_user.user_des = 1
add_user.insert
If InStr(add_user.oper_flag, "ok") > 0 Then
Me.Hide
MsgBox "添加用戶成功!", vbOKOnly + vbExclamation, "添加用戶"
Else
MsgBox "添加用戶失敗!", vbOKOnly + vbExclamation, "添加用戶"
End If
End If
End If
End If ' If add_user.state = 2 Then
End If
Set add_user = Nothing
Unload Me
End Sub
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -