📄 student.frm
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form student
BorderStyle = 5 'Sizable ToolWindow
Caption = "学生数据录入界面"
ClientHeight = 8895
ClientLeft = 4980
ClientTop = 1695
ClientWidth = 11685
LinkTopic = "Form2"
MaxButton = 0 'False
MinButton = 0 'False
Picture = "student.frx":0000
ScaleHeight = 8895
ScaleWidth = 11685
ShowInTaskbar = 0 'False
Begin MSAdodcLib.Adodc data
Height = 615
Left = 1800
Top = 8040
Width = 5895
_ExtentX = 10398
_ExtentY = 1085
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 = 12648447
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=student"
OLEDBString = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=student"
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = "select * from student"
Caption = "选择你所要查看的信息"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "华文中宋"
Size = 18
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
Begin VB.CommandButton updata
BackColor = &H00C0FFFF&
Caption = "更新记录"
Height = 375
Left = 3960
Style = 1 'Graphical
TabIndex = 11
Top = 5520
Width = 1455
End
Begin VB.CommandButton motify
BackColor = &H00C0FFFF&
Caption = "修改"
Height = 375
Left = 5400
Style = 1 'Graphical
TabIndex = 10
Top = 6120
Width = 1095
End
Begin VB.CommandButton delete
BackColor = &H00C0FFFF&
Caption = "删除"
Height = 375
Left = 3960
Style = 1 'Graphical
TabIndex = 9
Top = 6600
Width = 1455
End
Begin VB.CommandButton add
BackColor = &H00C0FFFF&
Caption = "添加"
Height = 375
Left = 2880
Style = 1 'Graphical
TabIndex = 8
Top = 6120
Width = 1095
End
Begin VB.TextBox class
DataField = "class"
DataSource = "data"
Height = 375
Left = 2880
TabIndex = 3
Top = 3960
Width = 3735
End
Begin VB.TextBox major
DataField = "major"
DataSource = "data"
Height = 375
Left = 2880
TabIndex = 2
Top = 2760
Width = 3375
End
Begin VB.TextBox id
DataField = "student_id"
DataSource = "data"
Height = 375
Left = 2880
TabIndex = 1
Top = 1680
Width = 2895
End
Begin VB.TextBox stuName
DataField = "student_name"
DataSource = "data"
Height = 375
Left = 2880
TabIndex = 0
Top = 600
Width = 2175
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "专业"
BeginProperty Font
Name = "楷体_GB2312"
Size = 14.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Index = 5
Left = 360
TabIndex = 7
Top = 2880
Width = 1215
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "班级"
BeginProperty Font
Name = "楷体_GB2312"
Size = 14.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Index = 4
Left = 360
TabIndex = 6
Top = 3960
Width = 1215
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "学号"
BeginProperty Font
Name = "楷体_GB2312"
Size = 14.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Index = 2
Left = 360
TabIndex = 5
Top = 1680
Width = 1215
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "姓名"
BeginProperty Font
Name = "楷体_GB2312"
Size = 14.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Index = 1
Left = 360
TabIndex = 4
Top = 600
Width = 1215
End
End
Attribute VB_Name = "student"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub add_Click()
On Error Resume Next
delete.Enabled = Not delete.Enabled
modify.Enabled = Not modify.Enable
Update.Enabled = Not Update.Enable
If add.Caption = "添加" Then
add.Caption = "确认"
data.Recordset.AddNew
stuName.SetFocus
Else
add.Caption = "添加"
data.Recordset.Update
data.Recordset.MoveLast
End If
End Sub
Private Sub delete_Click()
On Error Resume Next
data.Recordset.delete
data.Recordset.MoveNext
If data.Recordset.EOF Then
dataa.recorset.MoveLast
End If
End Sub
Private Sub motify_Click()
On Error Resume Next
If modift.Caption = "修改" Then
modify.Caption = "确认"
stuName.SetFocus
Else
modify.Caption = "修改"
Adodc1.Recordset.Fields("student_name") = stuName.Text
Adodc1.Recordset.Fields("student_id") = id.Text
Adodc1.Recordset.Fields("major") = major.Text
Adodc1.Recordset.Fields("class") = class.Text
Adodc1.Recordset.Update
End If
End Sub
Private Sub updata_Click()
main.Show
course.Hide
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -