?? main_xtgl_czysz.frm
字號:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form main_xtgl_czysz
BackColor = &H00C0C0C0&
BorderStyle = 1 'Fixed Single
Caption = "系統(tǒng)管理-【操作員設置】"
ClientHeight = 4050
ClientLeft = 45
ClientTop = 330
ClientWidth = 5985
Icon = "main_xtgl_czysz.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 4050
ScaleWidth = 5985
StartUpPosition = 1 '所有者中心
Begin VB.CommandButton CmdAdd
BackColor = &H00C0C0C0&
Caption = "&A 添加"
Height = 375
Left = 810
Style = 1 'Graphical
TabIndex = 9
Top = 3630
Width = 1080
End
Begin VB.CommandButton CmdCancel
BackColor = &H00C0C0C0&
Caption = "&C 取消"
Height = 375
Left = 2970
Style = 1 'Graphical
TabIndex = 7
Top = 3630
Width = 1080
End
Begin VB.CommandButton CmdOk
BackColor = &H00C0C0C0&
Caption = "&O 確定"
Height = 375
Left = 1890
Style = 1 'Graphical
TabIndex = 6
Top = 3630
Width = 1080
End
Begin VB.CommandButton CmdEnd
BackColor = &H00C0C0C0&
Caption = "&E 退出"
Height = 375
Left = 4050
Style = 1 'Graphical
TabIndex = 5
Top = 3630
Width = 1080
End
Begin VB.Frame Frame1
Height = 3480
Left = 120
TabIndex = 0
Top = 75
Width = 5745
Begin VB.ComboBox Combo1
Height = 300
Left = 2700
TabIndex = 11
Top = 2400
Width = 2820
End
Begin VB.TextBox TxtBH
BackColor = &H00FFFFFF&
Height = 330
Left = 2700
Locked = -1 'True
TabIndex = 8
Top = 285
Width = 2820
End
Begin VB.TextBox TxtCZY
BackColor = &H00FFFFFF&
Height = 330
Left = 2700
TabIndex = 3
Top = 810
Width = 2820
End
Begin VB.TextBox TxtMM
BackColor = &H00FFFFFF&
Height = 330
IMEMode = 3 'DISABLE
Left = 2700
MaxLength = 6
TabIndex = 2
Top = 1335
Width = 2820
End
Begin VB.TextBox TxtOk
BackColor = &H00FFFFFF&
Height = 330
IMEMode = 3 'DISABLE
Left = 2700
MaxLength = 6
PasswordChar = "*"
TabIndex = 1
Top = 1875
Width = 2820
End
Begin MSComctlLib.ImageList ImageList1
Left = -60
Top = 3045
_ExtentX = 1005
_ExtentY = 1005
BackColor = -2147483643
ImageWidth = 16
ImageHeight = 16
MaskColor = 12632256
_Version = 393216
BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628}
NumListImages = 10
BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "main_xtgl_czysz.frx":000C
Key = "頭像1"
EndProperty
BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "main_xtgl_czysz.frx":0EE8
Key = "頭像2"
EndProperty
BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "main_xtgl_czysz.frx":17C4
Key = "頭像3"
EndProperty
BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "main_xtgl_czysz.frx":20A0
Key = "頭像4"
EndProperty
BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "main_xtgl_czysz.frx":23BC
Key = "頭像5"
EndProperty
BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "main_xtgl_czysz.frx":2C98
Key = "頭像6"
EndProperty
BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "main_xtgl_czysz.frx":3574
Key = "頭像7"
EndProperty
BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "main_xtgl_czysz.frx":3E50
Key = "頭像8"
EndProperty
BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "main_xtgl_czysz.frx":472C
Key = "頭像9"
EndProperty
BeginProperty ListImage10 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "main_xtgl_czysz.frx":5008
Key = "頭像10"
EndProperty
EndProperty
End
Begin MSComctlLib.ImageCombo ImageCombo1
Height = 330
Left = 2700
TabIndex = 10
Top = 2940
Width = 2820
_ExtentX = 4974
_ExtentY = 582
_Version = 393216
ForeColor = -2147483640
BackColor = -2147483643
ImageList = "ImageList1"
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "級別設置 頭像設置 "
Height = 1380
Left = 1845
TabIndex = 12
Top = 2460
Width = 1290
End
Begin VB.Image Image1
Height = 3180
Left = 135
Picture = "main_xtgl_czysz.frx":5328
Stretch = -1 'True
Top = 165
Width = 1515
End
Begin VB.Label Label2
BackStyle = 0 'Transparent
Caption = "編 號 操作員 密 碼 確 認"
Height = 1875
Left = 1845
TabIndex = 4
Top = 360
Width = 1005
End
End
Begin MSAdodcLib.Adodc Adodc1
Height = 330
Left = 0
Top = 0
Visible = 0 'False
Width = 1200
_ExtentX = 2117
_ExtentY = 582
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 1
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 3
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = "DSN=NBooks"
OLEDBString = ""
OLEDBFile = ""
DataSourceName = "NBooks"
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = "select * from qxb"
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
End
Attribute VB_Name = "main_xtgl_czysz"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Form_Load()
Dim NewItem As ComboItem '聲明一個ComboItem對象
Dim i As Integer '聲明一個整型變量
Combo1.AddItem ("系統(tǒng)管理員")
Combo1.AddItem ("高級操作員")
Combo1.AddItem ("普通操作員")
For i = 1 To 10
Set NewItem = ImageCombo1.ComboItems.Add(i, "頭像" & i, "頭像" & i, "頭像" & i)
Next i
End Sub
Private Sub Form_Unload(Cancel As Integer)
frm_main.Enabled = True
End Sub
Private Sub TxtBH_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyReturn Then TxtBH.SetFocus '回車TxtBH獲得焦點
End Sub
Private Sub TxtCZY_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyReturn Then TxtMM.SetFocus '回車TxtMM獲得焦點
End Sub
Private Sub TxtMM_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyReturn Then TxtOk.SetFocus '回車TxtOk獲得焦點
End Sub
Private Sub TxtOk_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyReturn Then Combo1.SetFocus '回車Combo1獲得焦點
End Sub
Private Sub Combo1_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyReturn Then ImageCombo1.SetFocus
End Sub
Private Sub ImageCombo1_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyReturn Then CmdOk.SetFocus
End Sub
Private Sub CmdAdd_Click()
Adodc1.RecordSource = "select * from qxb"
Adodc1.Refresh
If Adodc1.Recordset.RecordCount > 0 Then
Adodc1.Recordset.MoveLast
TxtBH.text = Format(Val(Adodc1.Recordset.Fields("編號")) + 1, "00")
Else
TxtBH.text = "01"
End If
TxtCZY.SetFocus
End Sub
Private Sub cmdOK_Click()
'保存操作員及密碼
If TxtCZY.text = "" Then
MsgBox "系統(tǒng)不允許操作員為空!"
Exit Sub
End If
If TxtMM.text = "" Then
MsgBox "密碼不允許為空!"
Exit Sub
End If
If TxtOk.text = "" Then
MsgBox "確認密碼不允許為空!"
Exit Sub
End If
If TxtOk.text <> TxtMM.text Then
MsgBox "密碼與確認密碼不同,請重新輸入!"
Exit Sub
End If
If Combo1.text = "" Then
MsgBox "操作員級別不允許為空!"
Exit Sub
End If
If ImageCombo1.text = "" Then
MsgBox "操作員頭像不允許為空!"
Exit Sub
End If
Adodc1.RecordSource = "select * from qxb where 操作員級別='" + Combo1.text + "'"
Adodc1.Refresh
If Adodc1.Recordset.RecordCount > 0 Then
If ImageCombo1.text <> Adodc1.Recordset.Fields("頭像") Then
MsgBox ("此級別的操作員頭像應為【" & Adodc1.Recordset.Fields("頭像") & "】,請更改!")
Exit Sub
End If
End If
Adodc1.RecordSource = "select * from qxb where 操作員='" + TxtCZY.text + "'"
Adodc1.Refresh
With Adodc1.Recordset
If .RecordCount > 0 Then
MsgBox "此操作員已存在,請重新輸入!"
Else
.AddNew
.Fields("編號") = TxtBH.text
.Fields("操作員") = TxtCZY.text
.Fields("密碼") = TxtMM.text
.Fields("操作員級別") = Combo1.text
.Fields("頭像") = ImageCombo1.text
.Update '更新記錄
TxtBH.text = ""
TxtCZY.text = ""
TxtMM.text = ""
TxtOk.text = ""
Combo1.text = ""
ImageCombo1.text = ""
End If
End With
End Sub
Private Sub CmdCancel_Click()
TxtBH.text = ""
TxtCZY.text = ""
TxtMM.text = ""
TxtOk.text = ""
Combo1.text = ""
ImageCombo1.text = ""
End Sub
Private Sub CmdEnd_Click()
frm_main.Enabled = True
Unload Me
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -