📄 frmstudentmessage.frm
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Object = "{F0D2F211-CCB0-11D0-A316-00AA00688B10}#1.0#0"; "MSDATLST.OCX"
Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "MSDATGRD.OCX"
Begin VB.Form Frmstudentmessage
Caption = "学生信息管理"
ClientHeight = 4485
ClientLeft = 60
ClientTop = 465
ClientWidth = 8505
LinkTopic = "Form1"
ScaleHeight = 4485
ScaleWidth = 8505
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command5
Caption = "返回"
Height = 495
Left = 6960
TabIndex = 6
Top = 3720
Width = 1215
End
Begin VB.CommandButton Command4
Caption = "确定"
Height = 495
Left = 5280
TabIndex = 5
Top = 3720
Width = 1215
End
Begin MSAdodcLib.Adodc Adodc2
Height = 330
Left = 2880
Top = 240
Visible = 0 'False
Width = 1455
_ExtentX = 2566
_ExtentY = 582
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 = $"Frmstudentmessage.frx":0000
OLEDBString = $"Frmstudentmessage.frx":008C
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = "select * from class_message"
Caption = "Adodc2"
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 MSDataListLib.DataCombo DataCombo1
Bindings = "Frmstudentmessage.frx":0118
DataSource = "Adodc2"
Height = 330
Left = 240
TabIndex = 4
Top = 360
Width = 2055
_ExtentX = 3625
_ExtentY = 582
_Version = 393216
ListField = "class_name"
Text = "请选择。。。"
End
Begin VB.CommandButton Command3
Caption = "删除"
Enabled = 0 'False
Height = 495
Left = 3600
TabIndex = 3
Top = 3720
Width = 1215
End
Begin VB.CommandButton Command2
Caption = "添加"
Enabled = 0 'False
Height = 495
Left = 240
TabIndex = 2
Top = 3720
Width = 1215
End
Begin VB.CommandButton Command1
Caption = "修改"
Enabled = 0 'False
Height = 495
Left = 1920
TabIndex = 1
Top = 3720
Width = 1215
End
Begin MSAdodcLib.Adodc Adodc1
Height = 330
Left = 4800
Top = 240
Visible = 0 'False
Width = 1695
_ExtentX = 2990
_ExtentY = 582
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 = $"Frmstudentmessage.frx":012D
OLEDBString = $"Frmstudentmessage.frx":01B9
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = "select * from Student_message"
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 = "Frmstudentmessage.frx":0245
Height = 2295
Left = 240
TabIndex = 0
Top = 1080
Visible = 0 'False
Width = 7935
_ExtentX = 13996
_ExtentY = 4048
_Version = 393216
AllowUpdate = 0 'False
Enabled = -1 'True
HeadLines = 1
RowHeight = 15
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 = 5
BeginProperty Column00
DataField = "student_ic"
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 = "student_id"
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 = "student_name"
Caption = "姓名"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column03
DataField = "student_sex"
Caption = "性别"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column04
DataField = "student_old"
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
BeginProperty Column02
EndProperty
BeginProperty Column03
EndProperty
BeginProperty Column04
EndProperty
EndProperty
End
Begin VB.Frame Frame1
Appearance = 0 'Flat
BackColor = &H80000005&
ForeColor = &H80000008&
Height = 2655
Left = 120
TabIndex = 7
Top = 840
Width = 8175
End
End
Attribute VB_Name = "Frmstudentmessage"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim Classid As String
Private Sub Command1_Click()
DataGrid1.AllowUpdate = True
Command1.Enabled = False
Command2.Enabled = False
Command3.Enabled = False
End Sub
Private Sub Command2_Click()
DataGrid1.AllowAddNew = True
Command1.Enabled = False
Command2.Enabled = False
Command3.Enabled = False
End Sub
Private Sub Command3_Click()
DataGrid1.AllowDelete = True
Command1.Enabled = False
Command2.Enabled = False
Command3.Enabled = False
MsgBox "按一下Delete键就可以删除啦!"
'cnn.Delete
End Sub
Private Sub Command4_Click()
Command1.Enabled = True
Command2.Enabled = True
Command3.Enabled = True
DataGrid1.AllowAddNew = False
DataGrid1.AllowDelete = False
DataGrid1.AllowUpdate = False
End Sub
Private Sub Command5_Click()
Unload Me
End Sub
Private Sub DataCombo1_Click(Area As Integer)
'Open_class_message
DataGrid1.Visible = True
class_id
Adodc1.RecordSource = "select * from Student_message where class_id=" & " '" & Classid & "' "
Adodc1.Refresh
Command1.Enabled = True
Command2.Enabled = True
Command3.Enabled = True
End Sub
Private Sub Form_Load()
DataGrid1.AllowUpdate = False
DataGrid1.AllowAddNew = False
DataGrid1.AllowDelete = False
End Sub
Public Sub class_id()
Open_class_message
Do While cnn.EOF = False
If cnn.EOF = True Then
Exit Do
End If
If cnn.Fields(1).Value = DataCombo1.Text Then
Classid = cnn.Fields(0).Value
End If
cnn.MoveNext
Loop
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -