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

📄 form1.frm

📁 vb电子书籍
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "Form1"
   ClientHeight    =   3195
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   4680
   LinkTopic       =   "Form1"
   ScaleHeight     =   3195
   ScaleWidth      =   4680
   StartUpPosition =   2  '屏幕中心
   Begin VB.CommandButton Command1 
      Caption         =   "最高"
      Height          =   350
      Index           =   3
      Left            =   3720
      TabIndex        =   11
      Top             =   2640
      Width           =   720
   End
   Begin VB.CommandButton Command1 
      Caption         =   "后一个"
      Height          =   350
      Index           =   2
      Left            =   2640
      TabIndex        =   10
      Top             =   2640
      Width           =   840
   End
   Begin VB.CommandButton Command1 
      Caption         =   " 前一个"
      Height          =   350
      Index           =   1
      Left            =   1320
      TabIndex        =   9
      Top             =   2640
      Width           =   840
   End
   Begin VB.CommandButton Command1 
      Caption         =   "新增"
      Height          =   350
      Index           =   0
      Left            =   360
      TabIndex        =   7
      Top             =   2640
      Width           =   600
   End
   Begin VB.TextBox Text3 
      Height          =   375
      Left            =   1800
      TabIndex        =   6
      Top             =   1320
      Width           =   1200
   End
   Begin VB.TextBox Text2 
      Height          =   375
      Left            =   1800
      TabIndex        =   5
      Top             =   720
      Width           =   1200
   End
   Begin VB.TextBox Text1 
      Height          =   375
      Left            =   1800
      TabIndex        =   4
      Top             =   120
      Width           =   1200
   End
   Begin VB.Label Label5 
      Caption         =   "2/4"
      Height          =   375
      Left            =   1800
      TabIndex        =   8
      Top             =   2040
      Width           =   855
   End
   Begin VB.Label Label4 
      Caption         =   "位置"
      Height          =   405
      Left            =   840
      TabIndex        =   3
      Top             =   2040
      Width           =   1005
   End
   Begin VB.Label Label3 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "总分"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   210
      Left            =   840
      TabIndex        =   2
      Top             =   1320
      Width           =   420
   End
   Begin VB.Label Label2 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "专业"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   210
      Left            =   840
      TabIndex        =   1
      Top             =   720
      Width           =   420
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "姓名"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   210
      Left            =   840
      TabIndex        =   0
      Top             =   120
      Width           =   420
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim stud(1 To 100) As StudType, n%, i%, Max!, maxi%
Private Sub Command1_Click(index As Integer)
    Select Case index
    Case 0
      If n < 100 Then
        n = n + 1
        i = n
        With stud(n)
        .Name = Text1: .special = Text2: .total = Val(Text3)
        End With
        Text1 = "": Text2 = "": Text3 = ""
    Else
        MsgBox "输入人数超过数组声明的个数"
        End
      End If
    Case 1
      If i > 1 Then i = i - 1
      With stud(i)
      Text1 = .Name: Text2 = .special: Text3 = .total
      End With
    Case 2
      If i < n Then i = i + 1
      With stud(i)
      Text1 = .Name: Text2 = .special: Text3 = .total
      End With
    Case 3
      Max = stud(1).total
      maxi = 1
      For j = 2 To n
        If stud(j).total > Max Then
          Max = stud(j).total
          maxi = j
        End If
      Next j
      With stud(maxi)
      Text1 = .Name: Text2 = .special: Text3 = .total
      End With
      i = maxi
  End Select
  Label5 = i & "/" & n
  End Sub
  

⌨️ 快捷键说明

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