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

📄 form4.frm

📁 一个提供自定义题库
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Form4 
   BackColor       =   &H0080C0FF&
   BorderStyle     =   0  'None
   Caption         =   "Form4"
   ClientHeight    =   2850
   ClientLeft      =   0
   ClientTop       =   0
   ClientWidth     =   7230
   LinkTopic       =   "Form4"
   ScaleHeight     =   2850
   ScaleWidth      =   7230
   ShowInTaskbar   =   0   'False
   StartUpPosition =   3  '窗口缺省
   Begin VB.CommandButton Command1 
      BackColor       =   &H00FF8080&
      Caption         =   "退出"
      Enabled         =   0   'False
      Height          =   375
      Left            =   5520
      Style           =   1  'Graphical
      TabIndex        =   3
      Top             =   2160
      Width           =   1215
   End
   Begin VB.TextBox Text1 
      Height          =   375
      Left            =   3480
      TabIndex        =   2
      Top             =   840
      Width           =   1815
   End
   Begin VB.Data Data1 
      Caption         =   "Data1"
      Connect         =   "Access"
      DatabaseName    =   "stk.mdb"
      DefaultCursorType=   0  '缺省游标
      DefaultType     =   2  '使用 ODBC
      Exclusive       =   0   'False
      Height          =   375
      Left            =   1800
      Options         =   0
      ReadOnly        =   0   'False
      RecordsetType   =   0  'Table
      RecordSource    =   "stk"
      Top             =   1800
      Visible         =   0   'False
      Width           =   2655
   End
   Begin VB.Line Line6 
      X1              =   7200
      X2              =   0
      Y1              =   2760
      Y2              =   2760
   End
   Begin VB.Line Line5 
      X1              =   7200
      X2              =   7200
      Y1              =   120
      Y2              =   2760
   End
   Begin VB.Line Line4 
      X1              =   7200
      X2              =   7200
      Y1              =   120
      Y2              =   2760
   End
   Begin VB.Line Line3 
      X1              =   0
      X2              =   0
      Y1              =   120
      Y2              =   2760
   End
   Begin VB.Line Line2 
      X1              =   0
      X2              =   7200
      Y1              =   120
      Y2              =   120
   End
   Begin VB.Line Line1 
      X1              =   0
      X2              =   7200
      Y1              =   0
      Y2              =   0
   End
   Begin VB.Label Label2 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "请输入成绩查看管理密码:"
      BeginProperty Font 
         Name            =   "华文行楷"
         Size            =   15.75
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   330
      Left            =   240
      TabIndex        =   1
      Top             =   360
      Width           =   3780
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      BeginProperty Font 
         Name            =   "楷体_GB2312"
         Size            =   26.25
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   525
      Left            =   120
      TabIndex        =   0
      Top             =   1320
      Width           =   300
   End
End
Attribute VB_Name = "Form4"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
End
End Sub

Private Sub Form_Activate()
Move (Screen.Width - Form4.Width) / 2, (Screen.Height - Form4.Height) / 2
Dim n As Long
n = 0
m = 0
Data1.Recordset.MoveFirst
Do
m = m + 1
If Data1.Recordset.Fields("answer") = Data1.Recordset.Fields("checkanswer") Then
n = n + 1
End If
Data1.Recordset.MoveNext
Loop Until Data1.Recordset.EOF = True
m = (n / m) * 100

Data1.Recordset.MoveFirst
Do
Data1.Recordset.Edit
Data1.Recordset.Fields("checkanswer") = ""
Data1.Recordset.Update
Data1.Recordset.MoveNext
Loop Until Data1.Recordset.EOF = True

Dim db As Database
Dim rs As Recordset
Set db = OpenDatabase(App.Path + "\stk.mdb")
Set rs = db.OpenRecordset("cj")
rs.Index = "xh"
rs.Seek "=", xuehao
rs.Edit
rs.Fields("cj") = m
rs.Update

End Sub

Private Sub Text1_KeyPress(KeyAscii As Integer)
If Text1.Text = "123" Then
Label1.Caption = xmm & "(" & xuehao & ")成绩是" & m
Command1.Enabled = True
End If

End Sub

⌨️ 快捷键说明

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