📄 formglyglyh.frm
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "MSDATGRD.OCX"
Begin VB.Form Form管理员管理用户
BackColor = &H00FFC0C0&
Caption = "管理员管理用户"
ClientHeight = 5565
ClientLeft = 4005
ClientTop = 2880
ClientWidth = 7740
LinkTopic = "Form1"
MaxButton = 0 'False
ScaleHeight = 5565
ScaleWidth = 7740
StartUpPosition = 2 '屏幕中心
Begin VB.Frame Frame2
Caption = "管理员操作"
Height = 1815
Left = 4080
TabIndex = 2
Top = 3480
Width = 3495
Begin VB.CommandButton Command8
BackColor = &H00FFC0C0&
Caption = "退出"
Height = 495
Left = 2640
Style = 1 'Graphical
TabIndex = 10
Top = 1080
Width = 735
End
Begin VB.CommandButton Command7
BackColor = &H00FFC0C0&
Caption = "确定修改"
Height = 495
Left = 960
Style = 1 'Graphical
TabIndex = 9
Top = 1080
Width = 735
End
Begin VB.CommandButton Command6
BackColor = &H00FFC0C0&
Caption = "删除"
Height = 495
Left = 1800
Style = 1 'Graphical
TabIndex = 8
Top = 1080
Width = 735
End
Begin VB.CommandButton Command5
BackColor = &H00FFC0C0&
Caption = "修改"
Height = 495
Left = 120
Style = 1 'Graphical
TabIndex = 7
Top = 1080
Width = 735
End
Begin VB.CommandButton Command4
BackColor = &H00FFC0C0&
Caption = "最后一条记录"
Height = 495
Left = 2640
Style = 1 'Graphical
TabIndex = 6
Top = 360
Width = 735
End
Begin VB.CommandButton Command3
BackColor = &H00FFC0C0&
Caption = "下一条记录"
Height = 495
Left = 1800
Style = 1 'Graphical
TabIndex = 5
Top = 360
Width = 735
End
Begin VB.CommandButton Command2
BackColor = &H00FFC0C0&
Caption = "上一条记录"
Height = 495
Left = 960
Style = 1 'Graphical
TabIndex = 4
Top = 360
Width = 735
End
Begin VB.CommandButton Command1
BackColor = &H00FFC0C0&
Caption = "第一条记录"
Height = 495
Left = 120
Style = 1 'Graphical
TabIndex = 3
Top = 360
Width = 735
End
End
Begin VB.Frame Frame1
Caption = "用户信息"
Height = 3135
Left = 4080
TabIndex = 1
Top = 120
Width = 3495
Begin VB.TextBox Text3
DataField = "Utype"
DataSource = "Adodc1"
Enabled = 0 'False
Height = 495
Left = 1080
TabIndex = 16
Top = 2160
Width = 2175
End
Begin VB.TextBox Text2
DataField = "Upassword"
DataSource = "Adodc1"
Enabled = 0 'False
Height = 495
Left = 1080
TabIndex = 15
Top = 1320
Width = 2175
End
Begin VB.TextBox Text1
DataField = "Uname"
DataSource = "Adodc1"
Enabled = 0 'False
Height = 495
Left = 1080
TabIndex = 14
Top = 480
Width = 2175
End
Begin VB.Label Label3
Caption = "身 份:"
Height = 495
Left = 120
TabIndex = 13
Top = 2280
Width = 1095
End
Begin VB.Label Label2
Caption = "密 码:"
Height = 615
Left = 120
TabIndex = 12
Top = 1440
Width = 1215
End
Begin VB.Label Label1
Caption = "用户名:"
Height = 615
Left = 120
TabIndex = 11
Top = 600
Width = 1095
End
End
Begin MSAdodcLib.Adodc Adodc1
Height = 495
Left = 480
Top = 4320
Visible = 0 'False
Width = 1695
_ExtentX = 2990
_ExtentY = 873
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 2
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=employer;Data Source=(local)"
OLEDBString = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=employer;Data Source=(local)"
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = "usermessege"
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
Begin MSDataGridLib.DataGrid DataGrid1
Bindings = "Formglyglyh.frx":0000
Height = 5175
Left = 120
TabIndex = 0
Top = 120
Width = 3855
_ExtentX = 6800
_ExtentY = 9128
_Version = 393216
AllowUpdate = 0 'False
AllowArrows = -1 'True
BackColor = 16761024
Enabled = -1 'True
HeadLines = 1
RowHeight = 15
WrapCellPointer = -1 'True
FormatLocked = -1 'True
BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ColumnCount = 3
BeginProperty Column00
DataField = "Uname"
Caption = "用户名"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column01
DataField = "Upassword"
Caption = "用户密码"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column02
DataField = "Utype"
Caption = "用户身份"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
SplitCount = 1
BeginProperty Split0
ScrollBars = 3
BeginProperty Column00
ColumnWidth = 900.284
EndProperty
BeginProperty Column01
ColumnWidth = 1395.213
EndProperty
BeginProperty Column02
EndProperty
EndProperty
End
End
Attribute VB_Name = "Form管理员管理用户"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Adodc1.Recordset.MoveFirst
End Sub
Private Sub Command2_Click()
Adodc1.Recordset.MovePrevious
If Adodc1.Recordset.BOF Then
Adodc1.Recordset.MoveLast
If Adodc1.Recordset.EOF Then
Exit Sub
End If
End If
End Sub
Private Sub Command3_Click()
Adodc1.Recordset.MoveNext
If Adodc1.Recordset.EOF Then
Adodc1.Recordset.MoveFirst
If Adodc1.Recordset.BOF Then
Exit Sub
End If
End If
End Sub
Private Sub Command4_Click()
Adodc1.Recordset.MoveLast
End Sub
Private Sub Command5_Click()
Text3.Enabled = True
Command1.Enabled = False
Command2.Enabled = False
Command3.Enabled = False
Command4.Enabled = False
Command5.Enabled = False
Command6.Enabled = False
Text1.DataField = ""
Text2.DataField = ""
Text3.DataField = ""
End Sub
Private Sub Command6_Click()
Dim res As String
res = MsgBox("你确定要删除此信息吗?", vbQuestion + vbYesNo, "提示")
If res = vbYes Then
Adodc1.Recordset.Delete
Adodc1.Recordset.MoveNext
If Adodc1.Recordset.EOF Then
Adodc1.Recordset.MoveFirst
End If
End If
End Sub
Private Sub Command7_Click()
Dim res As String
res = MsgBox("你确定要更新此信息吗?", vbQuestion + vbYesNo, "提示")
If res = vbYes Then
Adodc1.Recordset.Delete
Adodc1.RecordSource = "select * from usermessege where uname='" & Trim(Text1.Text) & "'"
If Adodc1.Recordset.EOF = False Then
MsgBox "此用户名已经存在,请另外选择用户名!", vbOKOnly + vbExclamation, "警告"
Text1.SetFocus
Exit Sub
End If
Adodc1.Recordset.AddNew
Adodc1.Recordset.Fields("Uname") = Trim(Text1.Text)
Adodc1.Recordset.Fields("Upassword") = Trim(Text2.Text)
Adodc1.Recordset.Fields("Utype") = Trim(Text3.Text)
Adodc1.Recordset.Update
MsgBox "信息修改成功!", vbOKOnly + vbExclamation, "提示"
Adodc1.Recordset.MoveLast
End If
Text1.Enabled = False
Text2.Enabled = False
Text3.Enabled = False
Command1.Enabled = True
Command2.Enabled = True
Command3.Enabled = True
Command4.Enabled = True
Command5.Enabled = True
Command6.Enabled = True
Text1.DataField = "Uname"
Text2.DataField = "Upassword"
Text3.DataField = "Utype"
End Sub
Private Sub Command8_Click()
Text1.Enabled = False
Text2.Enabled = False
Text3.Enabled = False
Command1.Enabled = True
Command2.Enabled = True
Command3.Enabled = True
Command4.Enabled = True
Command5.Enabled = True
Command6.Enabled = True
Form管理员管理.Show
Me.Hide
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -