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

📄 frmscoresedit.frm

📁 成绩管理系统,使用VB6.0编写,相当不错,可以用于课程设计
💻 FRM
字号:
VERSION 5.00
Begin VB.Form FrmScoresEdit 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "编辑考试成绩信息"
   ClientHeight    =   2700
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   5985
   Icon            =   "FrmScoresEdit.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   2700
   ScaleWidth      =   5985
   StartUpPosition =   2  '屏幕中心
   Begin VB.CommandButton Cmd_OK 
      Caption         =   "确 定"
      Default         =   -1  'True
      Height          =   400
      Left            =   1382
      MouseIcon       =   "FrmScoresEdit.frx":0CCA
      MousePointer    =   99  'Custom
      Style           =   1  'Graphical
      TabIndex        =   5
      Top             =   2160
      Width           =   1300
   End
   Begin VB.CommandButton Cmd_Cancel 
      Cancel          =   -1  'True
      Caption         =   "取 消"
      Height          =   400
      Left            =   3302
      MouseIcon       =   "FrmScoresEdit.frx":0FD4
      MousePointer    =   99  'Custom
      Style           =   1  'Graphical
      TabIndex        =   4
      Top             =   2160
      Width           =   1300
   End
   Begin VB.Frame Frame1 
      Height          =   1815
      Left            =   240
      TabIndex        =   0
      Top             =   120
      Width           =   5535
      Begin VB.ComboBox ComboStu 
         Height          =   300
         Left            =   3960
         Style           =   2  'Dropdown List
         TabIndex        =   10
         Top             =   915
         Width           =   1455
      End
      Begin VB.TextBox txtScore 
         Alignment       =   1  'Right Justify
         Height          =   270
         Left            =   1320
         MaxLength       =   5
         TabIndex        =   7
         Top             =   1320
         Width           =   1335
      End
      Begin VB.Label Label5 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "学期名称"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   9
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00000000&
         Height          =   180
         Left            =   240
         TabIndex        =   12
         Top             =   240
         Width           =   720
      End
      Begin VB.Label lbl_TermName 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "lbl_TermName"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   9
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00000000&
         Height          =   180
         Left            =   1320
         TabIndex        =   11
         Top             =   240
         Width           =   1080
      End
      Begin VB.Label Label4 
         AutoSize        =   -1  'True
         BackColor       =   &H00FFC0C0&
         BackStyle       =   0  'Transparent
         Caption         =   "学生姓名"
         Height          =   180
         Left            =   3000
         TabIndex        =   9
         Top             =   975
         Width           =   720
      End
      Begin VB.Label Label2 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "考试成绩"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   9
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00000000&
         Height          =   180
         Left            =   240
         TabIndex        =   8
         Top             =   1365
         Width           =   720
      End
      Begin VB.Label lbl_ClassName 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "lbl_ClassName"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   9
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00000000&
         Height          =   180
         Left            =   1320
         TabIndex        =   6
         Top             =   975
         Width           =   1170
      End
      Begin VB.Label lbl_LessonName 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "lbl_LessonName"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   9
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00000000&
         Height          =   180
         Left            =   1320
         TabIndex        =   3
         Top             =   600
         Width           =   1260
      End
      Begin VB.Label Label8 
         AutoSize        =   -1  'True
         BackColor       =   &H00FFC0C0&
         BackStyle       =   0  'Transparent
         Caption         =   "所在班级"
         Height          =   180
         Left            =   240
         TabIndex        =   2
         Top             =   975
         Width           =   720
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "课程名称"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   9
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00000000&
         Height          =   180
         Left            =   240
         TabIndex        =   1
         Top             =   600
         Width           =   720
      End
   End
End
Attribute VB_Name = "FrmScoresEdit"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public Modify As Boolean
Public TmpAid As Long
Public TmpCid As Long
Public OriStuName As String

Private Sub Cmd_Cancel_Click()
  Unload Me
End Sub

Private Sub Cmd_OK_Click()
  If ComboStu.ListIndex = -1 Then
    MsgBox "请选择学生"
    Exit Sub
  End If
  With MyScores
  .ArrangeId = TmpAid
  .Student_Id = Arr_StuId(ComboStu.ListIndex)
  .Score = Val(txtScore)
  
  If Modify = False Then
    If .In_DB(TmpAid, .Student_Id) = True Then
      MsgBox "当前学生的当前课程分数已经存在"
      Exit Sub
    End If
    
    .Insert
  Else
    Call .Update(TmpAid, .Student_Id)
  End If
  
  End With
  MsgBox "编辑完成"
  Unload Me
End Sub

Private Sub Form_Load()
  Dim i As Integer
  '把当前班级的所有学生信息装入到数组中
  MyStu.Load_By_Class (TmpCid)
  '把数组中的学生姓名依次添加到ComboStu组合框中
  i = 0
  Do While Arr_StuName(i) <> ""
    ComboStu.AddItem Arr_StuName(i)
    i = i + 1
  Loop
  '根据当前的状态,设置学生姓名
  If Modify = False Then
    If ComboStu.ListCount > 0 Then
      ComboStu.ListIndex = 0
    End If
  Else
    If InCombo(OriStuName, ComboStu) = True Then
      ComboStu.Text = OriStuName
    End If
  End If
End Sub

Private Sub Label3_Click()

End Sub

Private Sub txtScore_KeyPress(KeyAscii As Integer)
  EnterTAB (KeyAscii)
  If In_Int(KeyAscii) = False Then
    KeyAscii = 0
  End If
End Sub

⌨️ 快捷键说明

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