📄 form8.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 Form8
Caption = "学籍管理系统>>用户管理"
ClientHeight = 3675
ClientLeft = 60
ClientTop = 450
ClientWidth = 6225
LinkTopic = "Form8"
ScaleHeight = 3675
ScaleWidth = 6225
StartUpPosition = 3 '窗口缺省
Begin MSAdodcLib.Adodc Adodc1
Height = 345
Left = 1590
Top = 2370
Visible = 0 'False
Width = 3075
_ExtentX = 5424
_ExtentY = 609
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 8
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = ""
OLEDBString = ""
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = ""
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
Height = 1965
Left = 240
TabIndex = 7
Top = 1530
Width = 5715
_ExtentX = 10081
_ExtentY = 3466
_Version = 393216
AllowUpdate = -1 'True
HeadLines = 1
RowHeight = 15
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 = 2
BeginProperty Column00
DataField = ""
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 = ""
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
BeginProperty Column00
EndProperty
BeginProperty Column01
EndProperty
EndProperty
End
Begin VB.Frame Frame1
Caption = "用户信息"
Height = 1215
Left = 240
TabIndex = 0
Top = 180
Width = 5715
Begin VB.CommandButton Command2
Caption = "确认删除"
Height = 345
Left = 3810
TabIndex = 6
Top = 720
Width = 1275
End
Begin VB.CommandButton Command1
Caption = "修改"
Height = 345
Left = 3810
TabIndex = 5
Top = 270
Width = 1245
End
Begin VB.TextBox Text2
Height = 315
Left = 930
TabIndex = 4
Top = 750
Width = 2025
End
Begin VB.TextBox Text1
DataSource = "Adodc1"
Height = 315
Left = 930
TabIndex = 2
Top = 300
Width = 2025
End
Begin VB.Label Label2
Caption = "密 码"
Height = 225
Left = 120
TabIndex = 3
Top = 810
Width = 555
End
Begin VB.Label Label1
Caption = "用户名"
Height = 315
Left = 120
TabIndex = 1
Top = 360
Width = 615
End
End
End
Attribute VB_Name = "Form8"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub Command1_Click()
Adodc1.Recordset.Fields(0) = Text1.Text
Adodc1.Recordset.Fields(1) = Text2.Text
Adodc1.Recordset.Update
End Sub
Private Sub Command2_Click()
Dim i As Integer
i = MsgBox("是否删除当前记录?", vbYesNo + vbQuestion, "提示")
If i = vbYes Then
Adodc1.Recordset.Delete
Adodc1.Recordset.Update
End If
End Sub
Private Sub Form_Load()
Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\db1.mdb"
Adodc1.CommandType = adCmdTable
Adodc1.RecordSource = "yonghu"
Set DataGrid1.DataSource = Adodc1
DataGrid1.Refresh
Set Text1.DataSource = Adodc1
Set Text2.DataSource = Adodc1
Text1.DataField = "用户名称"
Text2.DataField = "密码"
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -