📄 frmedit.frm
字号:
TabIndex = 75
Top = 3645
Width = 630
End
Begin VB.Label lbl
Appearance = 0 'Flat
AutoSize = -1 'True
BackColor = &H80000005&
BackStyle = 0 'Transparent
Caption = "城市(&C)"
ForeColor = &H80000008&
Height = 180
Index = 14
Left = 240
TabIndex = 77
Top = 4005
Width = 630
End
Begin VB.Label lbl
Appearance = 0 'Flat
AutoSize = -1 'True
BackColor = &H80000005&
BackStyle = 0 'Transparent
Caption = "电话(&H)"
ForeColor = &H80000008&
Height = 180
Index = 15
Left = 240
TabIndex = 79
Top = 4365
Width = 630
End
Begin VB.Label lbl
Appearance = 0 'Flat
AutoSize = -1 'True
BackColor = &H80000005&
BackStyle = 0 'Transparent
Caption = "邮箱(&E)"
ForeColor = &H80000008&
Height = 180
Index = 16
Left = 240
TabIndex = 81
Top = 4725
Width = 630
End
Begin VB.Label lbl
Appearance = 0 'Flat
AutoSize = -1 'True
BackColor = &H80000005&
BackStyle = 0 'Transparent
Caption = "姓名(&N)"
ForeColor = &H80000008&
Height = 180
Index = 17
Left = 240
TabIndex = 71
Top = 2925
Width = 630
End
End
Begin VB.Frame fra
Caption = "说明 ( 255 字以内 )"
Height = 2775
Index = 6
Left = -71880
TabIndex = 89
Top = 2880
Width = 4935
Begin VB.TextBox txtShow
CausesValidation= 0 'False
Height = 2415
Index = 1
Left = 120
MaxLength = 255
MultiLine = -1 'True
ScrollBars = 3 'Both
TabIndex = 90
Top = 240
Width = 4695
End
End
Begin MSComctlLib.ListView lvDelete
CausesValidation= 0 'False
Height = 5175
Index = 0
Left = -72360
TabIndex = 31
Top = 480
Width = 5415
_ExtentX = 9551
_ExtentY = 9128
View = 3
Arrange = 2
LabelEdit = 1
MultiSelect = -1 'True
LabelWrap = 0 'False
HideSelection = 0 'False
OLEDragMode = 1
FullRowSelect = -1 'True
GridLines = -1 'True
PictureAlignment= 2
TextBackground = -1 'True
_Version = 393217
ForeColor = -2147483630
BackColor = -2147483643
Appearance = 1
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
OLEDragMode = 1
NumItems = 0
End
Begin MSComctlLib.TreeView tvDelete
CausesValidation= 0 'False
Height = 5175
Index = 0
Left = -74880
TabIndex = 30
Top = 480
Width = 2415
_ExtentX = 4260
_ExtentY = 9128
_Version = 393217
HideSelection = 0 'False
LabelEdit = 1
Style = 7
FullRowSelect = -1 'True
Appearance = 1
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
OLEDragMode = 1
End
Begin MSComctlLib.ListView lvDelete
CausesValidation= 0 'False
Height = 5175
Index = 1
Left = -72360
TabIndex = 92
Top = 480
Width = 5415
_ExtentX = 9551
_ExtentY = 9128
View = 3
Arrange = 2
LabelEdit = 1
MultiSelect = -1 'True
LabelWrap = 0 'False
HideSelection = 0 'False
OLEDragMode = 1
FullRowSelect = -1 'True
GridLines = -1 'True
PictureAlignment= 2
TextBackground = -1 'True
_Version = 393217
ForeColor = -2147483630
BackColor = -2147483643
Appearance = 1
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
OLEDragMode = 1
NumItems = 0
End
Begin MSComctlLib.TreeView tvDelete
CausesValidation= 0 'False
Height = 5175
Index = 1
Left = -74880
TabIndex = 91
Top = 480
Width = 2415
_ExtentX = 4260
_ExtentY = 9128
_Version = 393217
HideSelection = 0 'False
LabelEdit = 1
Style = 7
FullRowSelect = -1 'True
Appearance = 1
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
OLEDragMode = 1
End
Begin MSComctlLib.TreeView tvModify
CausesValidation= 0 'False
Height = 5175
Index = 0
Left = -74880
TabIndex = 32
Top = 480
Width = 2415
_ExtentX = 4260
_ExtentY = 9128
_Version = 393217
HideSelection = 0 'False
LabelEdit = 1
Style = 7
FullRowSelect = -1 'True
Appearance = 1
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
OLEDragMode = 1
End
Begin MSComctlLib.TreeView tvModify
CausesValidation= 0 'False
Height = 5175
Index = 1
Left = -74880
TabIndex = 93
Top = 480
Width = 2415
_ExtentX = 4260
_ExtentY = 9128
_Version = 393217
HideSelection = 0 'False
LabelEdit = 1
Style = 7
FullRowSelect = -1 'True
Appearance = 1
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
OLEDragMode = 1
End
End
Begin VB.Menu mnuEdit
Caption = "编辑(&E)"
Visible = 0 'False
Begin VB.Menu mnuEditAdd
Caption = "添加(&A)"
End
Begin VB.Menu mnuEditDelete
Caption = "删除(&D)"
End
Begin VB.Menu mnuEditModify
Caption = "修改(&M)"
End
Begin VB.Menu mnuEdit1
Caption = "-"
End
Begin VB.Menu mnuEditSelectAll
Caption = "全选(&S)"
End
Begin VB.Menu mnuEditSelectInvert
Caption = "反选(&I)"
End
End
End
Attribute VB_Name = "frmEdit"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private lastRecord As String
Private lastDelete As Long
Private tkID As String
Private Sub InitControl()
Dim ctl As Control
Dim iCount As Integer
For Each ctl In Me.Controls
If TypeName(ctl) = "TextBox" Then
ctl.Text = ""
End If
Next ctl
For iCount = 3 To 0 Step -1
icbFaces(iCount).ComboItems(1).Selected = True
optSex(iCount).Value = True
optModifySex(iCount).Value = True
Next iCount
If tkPower = 0 Then
For iCount = 0 To 2
stbEdit.TabEnabled(iCount) = False
Next iCount
End If
cboPower(0).ListIndex = 0
cboPower(1).ListIndex = 0
End Sub
Private Sub cmdAdd_Click()
Select Case stbEdit.Tab
Case 0
AddRecord "管理员", 0
Case 1, 4
mnuEditAdd_Click
Case 3
AddRecord "用户", 1
End Select
End Sub
Private Sub cmdClose_Click()
Unload Me
End Sub
Private Sub AddRecord(tkTable As String, tkAdminUser As Integer)
' On Error Resume Next
Dim iRecordCount As Long
If txtName(tkAdminUser).Text = "" Or txtPassword(tkAdminUser * 2).Text = "" Then
MsgBox "有 * 的为必填字段,请重新输入!", vbCritical, "警告"
Exit Sub
End If
If txtPassword(tkAdminUser * 2).Text <> txtPassword(tkAdminUser * 2 + 1).Text Then
MsgBox "密码确认错误,请输入两个相同的密码!", vbCritical, "警告"
Exit Sub
End If
If rst.State = adStateOpen Then rst.Close
rst.Open tkTable, cnn, adOpenKeyset, adLockOptimistic
If rst.RecordCount > 0 Then
rst.MoveLast
lastRecord = rst!标识
ElseIf rst.RecordCount = 0 The
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -