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

📄 frmzhujiemian.frm

📁 用Visual Basic 6.0+Access 做的考试系统源代码
💻 FRM
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "mscomctl.ocx"
Begin VB.Form frmzhujiemian 
   Caption         =   "考生信息"
   ClientHeight    =   5310
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   8475
   LinkTopic       =   "Form1"
   ScaleHeight     =   5310
   ScaleWidth      =   8475
   StartUpPosition =   3  '窗口缺省
   Tag             =   "1"
   Begin VB.CheckBox Check1 
      Caption         =   "是否修改"
      Enabled         =   0   'False
      Height          =   375
      Left            =   5400
      TabIndex        =   30
      Top             =   2400
      Width           =   1815
   End
   Begin MSComctlLib.StatusBar StatusBar1 
      Align           =   2  'Align Bottom
      Height          =   375
      Left            =   0
      TabIndex        =   29
      Top             =   4935
      Width           =   8475
      _ExtentX        =   14949
      _ExtentY        =   661
      _Version        =   393216
      BeginProperty Panels {8E3867A5-8586-11D1-B16A-00C0F0283628} 
         NumPanels       =   6
         BeginProperty Panel1 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
            Object.Width           =   5292
            MinWidth        =   5292
            Text            =   "张玮华"
            TextSave        =   "张玮华"
         EndProperty
         BeginProperty Panel2 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
            Object.Width           =   5292
            MinWidth        =   5292
            Text            =   "软件专业  二班"
            TextSave        =   "软件专业  二班"
         EndProperty
         BeginProperty Panel3 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
            Object.Width           =   5292
            MinWidth        =   5292
            Text            =   "2003.8.1"
            TextSave        =   "2003.8.1"
         EndProperty
         BeginProperty Panel4 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
         EndProperty
         BeginProperty Panel5 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
         EndProperty
         BeginProperty Panel6 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
         EndProperty
      EndProperty
   End
   Begin VB.TextBox txtmulu 
      Appearance      =   0  'Flat
      BackColor       =   &H00E0E0E0&
      Enabled         =   0   'False
      Height          =   270
      Left            =   5760
      TabIndex        =   28
      Top             =   2025
      Width           =   495
   End
   Begin VB.CommandButton btnend 
      Caption         =   "退出"
      Height          =   375
      Left            =   5400
      TabIndex        =   26
      Top             =   3840
      Width           =   1935
   End
   Begin VB.CommandButton btnchao 
      Caption         =   "查找"
      Height          =   375
      Left            =   6600
      TabIndex        =   25
      Top             =   3000
      Width           =   1335
   End
   Begin VB.CommandButton btntian 
      Caption         =   "添加"
      Height          =   375
      Left            =   4800
      TabIndex        =   24
      Top             =   3000
      Width           =   1335
   End
   Begin VB.Frame Frame1 
      Caption         =   "学生成绩"
      Height          =   2535
      Left            =   240
      TabIndex        =   13
      Top             =   2280
      Width           =   4095
      Begin VB.TextBox txtwen 
         Appearance      =   0  'Flat
         BackColor       =   &H00E0E0E0&
         Height          =   375
         Left            =   2880
         TabIndex        =   23
         Top             =   1200
         Width           =   855
      End
      Begin VB.TextBox txtli 
         Appearance      =   0  'Flat
         BackColor       =   &H00E0E0E0&
         Height          =   375
         Left            =   2880
         TabIndex        =   22
         Top             =   480
         Width           =   855
      End
      Begin VB.TextBox txtying 
         Appearance      =   0  'Flat
         BackColor       =   &H00E0E0E0&
         Height          =   375
         Left            =   840
         TabIndex        =   21
         Top             =   1680
         Width           =   855
      End
      Begin VB.TextBox txtshu 
         Appearance      =   0  'Flat
         BackColor       =   &H00E0E0E0&
         Height          =   375
         Left            =   840
         TabIndex        =   20
         Top             =   960
         Width           =   855
      End
      Begin VB.TextBox txtyu 
         Appearance      =   0  'Flat
         BackColor       =   &H00E0E0E0&
         Height          =   375
         Left            =   840
         TabIndex        =   19
         Top             =   240
         Width           =   855
      End
      Begin VB.Label Label10 
         AutoSize        =   -1  'True
         Caption         =   "综合文科"
         Height          =   180
         Left            =   2040
         TabIndex        =   18
         Top             =   1320
         Width           =   720
      End
      Begin VB.Label Label9 
         AutoSize        =   -1  'True
         Caption         =   "综合理科"
         Height          =   180
         Left            =   2040
         TabIndex        =   17
         Top             =   600
         Width           =   720
      End
      Begin VB.Label Label8 
         AutoSize        =   -1  'True
         Caption         =   "英语"
         Height          =   180
         Left            =   240
         TabIndex        =   16
         Top             =   1800
         Width           =   360
      End
      Begin VB.Label Label7 
         AutoSize        =   -1  'True
         Caption         =   "数学"
         Height          =   180
         Left            =   240
         TabIndex        =   15
         Top             =   1080
         Width           =   360
      End
      Begin VB.Label Label6 
         AutoSize        =   -1  'True
         Caption         =   "语文"
         Height          =   180
         Left            =   240
         TabIndex        =   14
         Top             =   360
         Width           =   360
      End
   End
   Begin VB.CheckBox chejiang 
      Caption         =   "奖励"
      Height          =   495
      Left            =   2280
      TabIndex        =   12
      Top             =   1680
      Width           =   1095
   End
   Begin VB.OptionButton optnv 
      Caption         =   "女"
      Height          =   375
      Left            =   1200
      TabIndex        =   11
      Top             =   1680
      Width           =   735
   End
   Begin VB.OptionButton optnan 
      Caption         =   "男 "
      Height          =   375
      Left            =   120
      TabIndex        =   10
      Top             =   1680
      Width           =   735
   End
   Begin VB.TextBox txtluqu 
      Appearance      =   0  'Flat
      BackColor       =   &H00E0E0E0&
      Height          =   375
      Left            =   4440
      TabIndex        =   9
      Top             =   1320
      Width           =   3855
   End
   Begin VB.TextBox txter 
      Appearance      =   0  'Flat
      BackColor       =   &H00E0E0E0&
      Height          =   375
      Left            =   4440
      TabIndex        =   8
      Top             =   720
      Width           =   3855
   End
   Begin VB.TextBox txtyi 
      Appearance      =   0  'Flat
      BackColor       =   &H00E0E0E0&
      Height          =   375
      Left            =   4440
      TabIndex        =   7
      Top             =   120
      Width           =   3855
   End
   Begin VB.TextBox txtxingming 
      Appearance      =   0  'Flat
      BackColor       =   &H00E0E0E0&
      Height          =   375
      Left            =   1080
      TabIndex        =   3
      Top             =   960
      Width           =   2055
   End
   Begin VB.TextBox txtkaohao 
      Appearance      =   0  'Flat
      BackColor       =   &H00E0E0E0&
      Height          =   375
      Left            =   1080
      TabIndex        =   2
      Top             =   120
      Width           =   2055
   End
   Begin VB.Label Label11 
      AutoSize        =   -1  'True
      Caption         =   "目录数"
      Height          =   180
      Left            =   5040
      TabIndex        =   27
      Top             =   2040
      Width           =   540
   End
   Begin VB.Label Label5 
      AutoSize        =   -1  'True
      Caption         =   "录取学校"
      Height          =   180
      Left            =   3600
      TabIndex        =   6
      Top             =   1440
      Width           =   720
   End
   Begin VB.Label Label4 
      AutoSize        =   -1  'True
      Caption         =   "志愿二"
      Height          =   180
      Left            =   3720
      TabIndex        =   5
      Top             =   840
      Width           =   540
   End
   Begin VB.Label Label3 
      AutoSize        =   -1  'True
      Caption         =   "志愿一"
      Height          =   180
      Left            =   3720
      TabIndex        =   4
      Top             =   240
      Width           =   540
   End
   Begin VB.Label Label2 
      AutoSize        =   -1  'True
      Caption         =   "学生姓名"
      Height          =   180
      Left            =   120
      TabIndex        =   1
      Top             =   960
      Width           =   720
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      Caption         =   "准考证号"
      Height          =   180
      Left            =   120
      TabIndex        =   0
      Top             =   240
      Width           =   720
   End
End
Attribute VB_Name = "frmzhujiemian"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim mystu As shu
Dim n As Integer
Private Type shu
    kaohao As Long
    xingming As String * 20
    yuwen As Integer
    shuxue As Integer
    yingyu As Integer
    zongwen As Integer
    zongli As Integer
    zhiyuanyi As String * 20
    zhiyuaner As String * 20
    ruquxuexiao As String * 20
    nan As Boolean
    nv As Boolean
    jiangli As Integer
End Type

Private Sub btnchao_Click()
Dim han As Integer
    Dim mystu As shu, jisu1
    jisu1 = FreeFile()
    Open "jilu.dat" For Random As #jisu1 Len = Len(mystu)
    Position = InputBox("请输入记录号", "数据输入")
    If Position = "0" Then
       MsgBox "请输入记录号"
       Position = InputBox("请输入记录号", "数据输入")
    Else
    If Position = "" Then
        Exit Sub
    End If
    
    Get #jisu1, Position, mystu
    Close #jisu1
    With mystu
    txtkaohao.Text = .kaohao
    txtxingming.Text = .xingming
    txtyi.Text = .zhiyuanyi
    txter.Text = .zhiyuaner
    txtyu.Text = .yuwen
    txtshu.Text = .shuxue
    txtying.Text = .yingyu
    txtli.Text = .zongli
    txtwen.Text = .zongwen
    optnan.Value = .nan
    optnv.Value = .nv
    chejiang.Value = .jiangli
    txtluqu.Text = .ruquxuexiao
    End With
    txtkaohao.Enabled = False
    txtxingming.Enabled = False
    txtyi.Enabled = False
    txter.Enabled = False
    txtyu.Enabled = False
    txtshu.Enabled = False
    txtying.Enabled = False
    txtli.Enabled = False
    txtwen.Enabled = False
    optnan.Enabled = False
    optnv.Enabled = False
    chejiang.Enabled = False
    txtluqu.Enabled = False
    Check1.Enabled = True
End If
End Sub

Private Sub btnend_Click()
    n = MsgBox("您是否要退出本程序", 4 + 32, "请确认")
    If n = 6 Then End
End Sub

Private Sub btntian_Click()
    Dim mystu As shu, n, shu1, shu2
    shu1 = FreeFile()
    Open "jiluhao.dat" For Input As #shu1
    Input #shu1, n
    Close #shu1
    shu3 = FreeFile()
    x = MsgBox("是否添加", 32 + 4, "请求")
    If x = 6 Then
        Open "jilu.dat" For Random As #1 Len = Len(mystu)
            If txtkaohao.Text = "" Or txtxingming.Text = "" Or txtyi.Text = "" Or txter.Text = "" Or txtyu.Text = "" Or txtshu.Text = "" Or txtying.Text = "" Or txtli.Text = "" Or txtwen.Text = "" Then
                MsgBox "请输入完成信息"
                Close #1
                Exit Sub
            End If
            With mystu
                .kaohao = txtkaohao.Text
                .xingming = txtxingming.Text
                .zhiyuanyi = txtyi.Text
                .zhiyuaner = txter.Text
                .yuwen = txtyu.Text
                .shuxue = txtshu.Text
                .yingyu = txtying.Text
                .zongli = txtli.Text
                .zongwen = txtwen.Text
                .nan = optnan.Value
                .nv = optnv.Value
                .jiangli = chejiang.Value
                .ruquxuexiao = txtluqu.Text
            End With
            Put #1, n, mystu
        Close #1
            MsgBox "第" & n & "数据已被纪录"
    Else
        Exit Sub
    End If
    n = n + 1
    shu2 = FreeFile()
    Open "jiluhao.dat" For Output As #shu2
    Print #shu2, n
    Close #shu2
    txtkaohao.Text = ""
    txtxingming.Text = ""
    txtyi.Text = ""
    txter.Text = ""
    txtyu.Text = ""
    txtshu.Text = ""
    txtying.Text = ""
    txtli.Text = ""
    txtwen.Text = ""
    txtluqu.Text = ""
    txtmulu.Text = n
End Sub

Private Sub Check1_Click()
    If Check1.Value = 1 Then
        txtkaohao.Enabled = True
        txtxingming.Enabled = True
        txtyi.Enabled = True
        txter.Enabled = True
        txtyu.Enabled = True
        txtshu.Enabled = True
        txtying.Enabled = True
        txtli.Enabled = True
        txtwen.Enabled = True
        optnan.Enabled = True
        optnv.Enabled = True
        chejiang.Enabled = True
        txtluqu.Enabled = True
    Else
        txtkaohao.Enabled = False
        txtxingming.Enabled = False
        txtyi.Enabled = False
        txter.Enabled = False
        txtyu.Enabled = False
        txtshu.Enabled = False
        txtying.Enabled = False
        txtli.Enabled = False
        txtwen.Enabled = False
        optnan.Enabled = False
        optnv.Enabled = False
        chejiang.Enabled = False
        txtluqu.Enabled = False
    End If
End Sub

Private Sub Form_Load()
    Open "jiluhao.dat" For Input As #1
    Input #1, n
    Close #1
    txtmulu.Text = n
End Sub

⌨️ 快捷键说明

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