⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 form10.frm

📁 学生信息管理系统
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Form10 
   BackColor       =   &H00FFFF80&
   Caption         =   "Form10"
   ClientHeight    =   6090
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   8970
   LinkTopic       =   "Form10"
   ScaleHeight     =   6090
   ScaleWidth      =   8970
   StartUpPosition =   3  '窗口缺省
   Begin VB.CommandButton Command4 
      BackColor       =   &H00FFFF80&
      Caption         =   "学生退出"
      Height          =   495
      Left            =   7320
      Style           =   1  'Graphical
      TabIndex        =   10
      Top             =   1200
      Width           =   1575
   End
   Begin VB.TextBox temptext 
      Height          =   375
      Left            =   480
      TabIndex        =   9
      Top             =   6960
      Width           =   1815
   End
   Begin VB.TextBox Text1 
      Height          =   2175
      Left            =   360
      MultiLine       =   -1  'True
      TabIndex        =   7
      Top             =   3000
      Width           =   7815
   End
   Begin VB.TextBox textfindname 
      Height          =   615
      Left            =   2520
      TabIndex        =   6
      Top             =   1200
      Width           =   2535
   End
   Begin VB.TextBox textfindNum 
      Height          =   495
      Left            =   2520
      TabIndex        =   3
      Top             =   360
      Width           =   2535
   End
   Begin VB.CommandButton Command2 
      BackColor       =   &H00FFFF80&
      Caption         =   "管理员退出"
      Height          =   495
      Left            =   7320
      Style           =   1  'Graphical
      TabIndex        =   2
      Top             =   360
      Width           =   1575
   End
   Begin VB.CommandButton Command3 
      BackColor       =   &H00FFFF80&
      Caption         =   "查找"
      Height          =   495
      Left            =   5520
      Style           =   1  'Graphical
      TabIndex        =   1
      Top             =   1200
      Width           =   1575
   End
   Begin VB.CommandButton Command1 
      BackColor       =   &H00FFFF80&
      Caption         =   "查找"
      Height          =   495
      Left            =   5520
      Style           =   1  'Graphical
      TabIndex        =   0
      Top             =   360
      Width           =   1575
   End
   Begin VB.Label Label1 
      BackColor       =   &H00FFFF80&
      Caption         =   "查找到条数:"
      Height          =   255
      Left            =   5880
      TabIndex        =   8
      Top             =   5400
      Width           =   2055
   End
   Begin VB.Label Label3 
      BackColor       =   &H00FFFF80&
      Caption         =   "输入姓名:"
      Height          =   375
      Left            =   600
      TabIndex        =   5
      Top             =   1320
      Width           =   1215
   End
   Begin VB.Label Frame1 
      BackColor       =   &H00FFFF80&
      Caption         =   "输入学号:"
      Height          =   375
      Left            =   600
      TabIndex        =   4
      Top             =   360
      Width           =   1095
   End
End
Attribute VB_Name = "Form10"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False



Private Sub Command1_Click()
Dim h As Integer
Dim n As Integer
Dim F As Integer
Dim Comp1 As String
Dim Comp2 As String
Text1.Text = "学号" + "      " + "姓名" + "      " + "高数" + "      " + "英语" + "      " + "物理" + "      " + "c语言" + "    " + "计算机文化基础" + "    " + "平均分" + Chr(13) + Chr(10)
F = 0
h = 1





Open "cj.dat" For Random As #1 Len = Len(recordvar)
recordnumer = LOF(1) / Len(recordvar)
For n = 1 To recordnumer
            Get #1, n, recordvar
            
Comp1 = Trim(textfindNum.Text)
temptext.Text = recordvar.stnum
Comp2 = Trim(temptext.Text)
           
            
            
            If StrComp(Comp1, Comp2) = 0 Then
                h = n
                F = F + 1
              
Get #1, h, recordvar
With recordvar

Text1.Text = Text1.Text + recordvar.stnum + recordvar.stname + "      " + Trim(recordvar.gaoshu) + "         " + Trim(recordvar.yingyu) + "         " + Trim(recordvar.wuli) + "         " + Trim(recordvar.cyuyan) + "          " + Trim(recordvar.jisuanji) + "               " + Trim(recordvar.average) + Chr(13) + Chr(10)
End With
End If
Next n
Close #1

Label1.Caption = "一共找到" + Str(F) + "条记录"
If F = 0 Then

MsgBox "没有该记录", vbInformation, "提示"
End If
End Sub

Private Sub command2_Click()
Unload Me
Form2.Show
Form10.Command4.Visible = False
Form10.Command2.Visible = True
End Sub

Private Sub Command3_Click()

Dim h As Integer
Dim n As Integer
Dim F As Integer
Dim Comp1 As String
Dim Comp2 As String
Text1.Text = "学号" + "     " + "姓名" + "      " + "高数" + "      " + "英语" + "      " + "物理" + "      " + "c语言" + "    " + "计算机文化基础" + "    " + "平均分" + Chr(13) + Chr(10)
F = 0
h = 1
Open "cj.dat" For Random As #1 Len = Len(recordvar)
recordnumer = LOF(1) / Len(recordvar)
For n = 1 To recordnumer
            Get #1, n, recordvar
            
Comp1 = Trim(textfindname.Text)
temptext.Text = recordvar.stname
Comp2 = Trim(temptext.Text)
           
            
            
            If StrComp(Comp1, Comp2) = 0 Then
                h = n
                F = F + 1
              
Get #1, h, recordvar
With recordvar

Text1.Text = "学号" + "      " + "姓名" + "      " + "高数" + "      " + "英语" + "      " + "物理" + "      " + "c语言" + "    " + "计算机文化基础" + "    " + "平均分" + Chr(13) + Chr(10)
End With
                
   Text1.Text = Text1.Text + recordvar.stnum + recordvar.stname + "      " + Trim(recordvar.gaoshu) + "         " + Trim(recordvar.yingyu) + "         " + Trim(recordvar.wuli) + "         " + Trim(recordvar.cyuyan) + "          " + Trim(recordvar.jisuanji) + "               " + Trim(recordvar.average) + Chr(13) + Chr(10)
            End If
Next n
Close #1

Label1.Caption = "一共找到" + Str(F) + "条记录"
If F = 0 Then

MsgBox "没有该记录", vbInformation, "提示"
End If
End Sub

Private Sub Command4_Click()
Unload Me
Form2.Show
Form2.修改.Visible = False
Form2.添加.Visible = False
Form2.删除.Visible = False
Form10.Command2.Visible = False
End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -