?? frmusradd.frm
字號:
VERSION 5.00
Begin VB.Form FrmUsrAdd
BorderStyle = 1 'Fixed Single
Caption = "添加管理員"
ClientHeight = 3495
ClientLeft = 45
ClientTop = 360
ClientWidth = 3720
LinkTopic = "Form1"
MaxButton = 0 'False
MDIChild = -1 'True
ScaleHeight = 3495
ScaleWidth = 3720
Begin VB.CommandButton CmdCancel
Cancel = -1 'True
Caption = "取消"
Height = 375
Left = 2400
TabIndex = 11
Top = 3000
Width = 1215
End
Begin VB.TextBox TextName
Height = 375
IMEMode = 3 'DISABLE
Left = 1560
TabIndex = 10
Top = 1560
Width = 2055
End
Begin VB.TextBox TextID
Height = 375
Left = 1560
TabIndex = 4
Top = 600
Width = 2055
End
Begin VB.ComboBox CbType
Height = 300
ItemData = "FrmUsrAdd.frx":0000
Left = 1560
List = "FrmUsrAdd.frx":000D
Style = 2 'Dropdown List
TabIndex = 3
Top = 1125
Width = 2055
End
Begin VB.TextBox TextAddPwd1
Height = 375
IMEMode = 3 'DISABLE
Left = 1560
PasswordChar = "*"
TabIndex = 2
Top = 2040
Width = 2055
End
Begin VB.TextBox TextAddPwd2
Height = 375
IMEMode = 3 'DISABLE
Left = 1560
PasswordChar = "*"
TabIndex = 1
Top = 2565
Width = 2055
End
Begin VB.CommandButton CmdAddOk
Caption = "添加"
Height = 375
Left = 1080
TabIndex = 0
Top = 3000
Width = 1215
End
Begin VB.Label Label6
Caption = "請輸入管理員的詳細信息:"
BeginProperty Font
Name = "楷體_GB2312"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF0000&
Height = 375
Left = 120
TabIndex = 12
Top = 120
Width = 3495
End
Begin VB.Label Label1
Caption = "管理員ID:"
BeginProperty Font
Name = "楷體_GB2312"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF0000&
Height = 375
Left = 120
TabIndex = 9
Top = 600
Width = 1815
End
Begin VB.Label Label2
Caption = "類型:"
BeginProperty Font
Name = "楷體_GB2312"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF0000&
Height = 375
Left = 600
TabIndex = 8
Top = 1080
Width = 975
End
Begin VB.Label Label3
Caption = "姓名:"
BeginProperty Font
Name = "楷體_GB2312"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF0000&
Height = 375
Left = 600
TabIndex = 7
Top = 1560
Width = 975
End
Begin VB.Label Label4
Caption = "密碼:"
BeginProperty Font
Name = "楷體_GB2312"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF0000&
Height = 375
Left = 600
TabIndex = 6
Top = 2040
Width = 855
End
Begin VB.Label Label5
Caption = "密碼確認:"
BeginProperty Font
Name = "楷體_GB2312"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF0000&
Height = 375
Left = 120
TabIndex = 5
Top = 2520
Width = 1455
End
End
Attribute VB_Name = "FrmUsrAdd"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'添加管理員
Private Sub CmdAddOk_Click()
Dim str As String
'檢驗輸入內容
If Len(Trim(Me.TextID.Text)) <= 0 Then
MsgBox "請輸入管理員ID!"
Exit Sub
ElseIf Len(Trim(Me.TextID.Text)) > 16 Then
MsgBox "您輸入的管理員ID過長!"
Exit Sub
End If
If Len(Trim(Me.TextName.Text)) <= 0 Then
MsgBox "請輸入管理員姓名!"
Exit Sub
ElseIf Len(Trim(Me.TextName.Text)) > 4 Then
MsgBox "您輸入的姓名過長!"
Exit Sub
End If
If Len(Trim(Me.TextAddPwd1.Text)) <= 0 Then
MsgBox "請輸入密碼!"
Exit Sub
ElseIf Len(Trim(Me.TextAddPwd1.Text)) > 16 Then
MsgBox "您輸入密碼過長!"
Exit Sub
End If
If Trim(Me.TextAddPwd1.Text) <> Trim(Me.TextAddPwd2.Text) Then
MsgBox "兩次輸入的密碼不一致!"
Exit Sub
End If
'生成要發送的數據 = Usr,01,Usr_ID,Usr_Name,Usr_Pwd,Usr_Type
str = "Usr,01,"
str = str & Me.TextID.Text & ","
str = str & Me.TextName.Text & ","
str = str & Me.TextAddPwd1.Text & ","
str = str & Val(Me.CbType.Text)
'檢驗sock連接并向服務器發送數據
If MDIFrm.SockToSvr.State <> sckConnected Then
MsgBox "還沒有連接數據庫,不能發送請求!"
Exit Sub
End If
MDIFrm.SockToSvr.SendData str
Unload Me
End Sub
Private Sub CmdCancel_Click() '取消
Unload Me
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -