📄 b2.frm
字号:
VERSION 5.00
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX"
Begin VB.Form b2
BackColor = &H00FF8080&
BorderStyle = 1 'Fixed Single
Caption = "学生信息查询"
ClientHeight = 6120
ClientLeft = 3585
ClientTop = 2760
ClientWidth = 9450
Icon = "b2.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
Picture = "b2.frx":014A
ScaleHeight = 6120
ScaleWidth = 9450
StartUpPosition = 2 '屏幕中心
Begin VB.Data Data1
Connect = "Access 2000;"
DatabaseName = "D:\ww\管理系统\管理系统数据库.mdb"
DefaultCursorType= 0 '缺省游标
DefaultType = 2 '使用 ODBC
Exclusive = 0 'False
Height = 375
Left = 2520
Options = 0
ReadOnly = 0 'False
RecordsetType = 1 'Dynaset
RecordSource = "学生基本信息表"
Top = 6000
Visible = 0 'False
Width = 2295
End
Begin VB.ComboBox Combo1
DataField = "班级"
DataSource = "Data1"
Height = 300
ItemData = "b2.frx":10D72
Left = 5685
List = "b2.frx":10D88
TabIndex = 4
Top = 2280
Width = 2295
End
Begin VB.TextBox Text3
DataField = "姓名"
DataSource = "Data1"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 360
Left = 2078
TabIndex = 3
Top = 2280
Width = 2295
End
Begin VB.TextBox Text2
DataField = "身份证号"
DataSource = "Data1"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 360
Left = 5678
TabIndex = 2
Top = 1680
Width = 2295
End
Begin VB.TextBox Text1
DataField = "学号"
DataSource = "Data1"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 360
Left = 2078
TabIndex = 1
Top = 1680
Width = 2295
End
Begin MSFlexGridLib.MSFlexGrid MSFlexGrid1
Bindings = "b2.frx":10DC8
Height = 2175
Left = 1440
TabIndex = 11
Top = 2880
Width = 6615
_ExtentX = 11668
_ExtentY = 3836
_Version = 393216
Cols = 0
FixedCols = 0
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "幼圆"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Begin VB.Label Label12
BackColor = &H00FF8080&
BackStyle = 0 'Transparent
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 7080
TabIndex = 14
Top = 6060
Visible = 0 'False
Width = 615
End
Begin VB.Label l9
BackColor = &H00FF8080&
BackStyle = 0 'Transparent
Caption = "共有记录数:"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Index = 0
Left = 5640
TabIndex = 13
Top = 6060
Visible = 0 'False
Width = 1335
End
Begin VB.Label l8
BackColor = &H00FF8080&
BackStyle = 0 'Transparent
Caption = "记录:"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Index = 0
Left = 1800
TabIndex = 12
Top = 6060
Visible = 0 'False
Width = 735
End
Begin VB.Label l4
BackColor = &H00FF8080&
BackStyle = 0 'Transparent
Caption = " 姓名查找"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Index = 0
Left = 3120
TabIndex = 10
Top = 5340
Width = 1215
End
Begin VB.Shape s1
BorderColor = &H000000FF&
Height = 360
Left = 3000
Shape = 4 'Rounded Rectangle
Top = 5280
Visible = 0 'False
Width = 1455
End
Begin VB.Label l5
BackColor = &H00FF8080&
BackStyle = 0 'Transparent
Caption = "返 回"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Index = 0
Left = 5760
TabIndex = 9
Top = 5340
Width = 855
End
Begin VB.Shape s2
BorderColor = &H000000FF&
Height = 360
Left = 5520
Shape = 4 'Rounded Rectangle
Top = 5280
Visible = 0 'False
Width = 1215
End
Begin VB.Label Label5
BackColor = &H00FF8080&
BackStyle = 0 'Transparent
Caption = "班级"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 5078
TabIndex = 8
Top = 2310
Width = 495
End
Begin VB.Label Label4
BackColor = &H00FF8080&
BackStyle = 0 'Transparent
Caption = "姓名"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 1478
TabIndex = 7
Top = 2310
Width = 495
End
Begin VB.Label Label6
BackColor = &H00FF8080&
BackStyle = 0 'Transparent
Caption = "身份证号"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 4598
TabIndex = 6
Top = 1710
Width = 975
End
Begin VB.Label Label2
BackColor = &H00FF8080&
BackStyle = 0 'Transparent
Caption = "学号"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 1478
TabIndex = 5
Top = 1710
Width = 495
End
Begin VB.Label Label1
BackColor = &H00FF8080&
BackStyle = 0 'Transparent
Caption = "学生信息查询"
BeginProperty Font
Name = "华文行楷"
Size = 26.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 525
Index = 0
Left = 3113
TabIndex = 0
Top = 720
Width = 3225
End
End
Attribute VB_Name = "b2"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If X > s1.Left And X < s1.Left + s1.Width And Y > s1.Top And Y < s1.Top + s1.Height Then
s1.Visible = True
l4(0).ForeColor = &HFF&
Else:
s1.Visible = False
l4(0).ForeColor = &H0&
End If
If X > s2.Left And X < s2.Left + s2.Width And Y > s2.Top And Y < s2.Top + s2.Height Then
s2.Visible = True
l5(0).ForeColor = &HFF&
Else:
s2.Visible = False
l5(0).ForeColor = &H0&
End If
End Sub
Private Sub l4_Click(Index As Integer)
Dim xm As String
xm = InputBox$("请输入姓名", "查找窗")
Data1.RecordSource = " select *from 学生基本信息表 where 姓名='" & xm & "'"
Data1.Refresh
If Data1.Recordset.EOF Then
MsgBox "没有此学生!", 48, "提示"
Data1.RecordSource = "学生基本信息表"
Data1.Refresh
End If
End Sub
Private Sub l5_Click(Index As Integer)
Unload Me
main.Show
End Sub
Private Sub Form_Load()
Dim Mpath As String
Dim t As Integer
Mpath = App.Path
If Right(Mpath, 1) <> "\" Then Mpath = Mpath + "\"
Data1.DatabaseName = Mpath + "管理系统数据库"
Data1.RecordSource = "学生基本信息表"
Data1.Refresh
Text1.DataField = "学号"
Text2.DataField = "身份证号"
Text3.DataField = "姓名"
Combo1.DataField = "班级"
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Combo1.Text = ""
Text1.Enabled = False
Text2.Enabled = False
Text3.Enabled = False
Combo1.Enabled = False
Dim n As Variant
Data1.Refresh
Data1.Recordset.MoveLast
n = Data1.Recordset.RecordCount
Label12.Caption = n
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -