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

📄 form1.frm

📁 一个高考成绩查询系统
💻 FRM
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form Form1 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "高考查分系统"
   ClientHeight    =   3675
   ClientLeft      =   3255
   ClientTop       =   2205
   ClientWidth     =   4995
   Icon            =   "Form1.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   Picture         =   "Form1.frx":058A
   ScaleHeight     =   3675
   ScaleWidth      =   4995
   ShowInTaskbar   =   0   'False
   Begin MSAdodcLib.Adodc ado 
      Height          =   735
      Left            =   840
      Top             =   4200
      Width           =   3015
      _ExtentX        =   5318
      _ExtentY        =   1296
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   1
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   1
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   ""
      OLEDBString     =   ""
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   ""
      Caption         =   "Adodc1"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      _Version        =   393216
   End
   Begin VB.PictureBox Picture1 
      Appearance      =   0  'Flat
      BackColor       =   &H80000005&
      ForeColor       =   &H80000008&
      Height          =   495
      Left            =   1680
      Picture         =   "Form1.frx":2393
      ScaleHeight     =   465
      ScaleWidth      =   1665
      TabIndex        =   2
      Top             =   2280
      Width           =   1695
      Begin VB.Label Label2 
         BackStyle       =   0  'Transparent
         Caption         =   "  登   陆"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   14.25
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H0000FF00&
         Height          =   495
         Left            =   0
         TabIndex        =   3
         ToolTipText     =   "请输入8位准考证号"
         Top             =   0
         Width           =   1695
      End
   End
   Begin VB.TextBox Txt1 
      Appearance      =   0  'Flat
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   21.75
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FF00FF&
      Height          =   615
      Left            =   1920
      MaxLength       =   8
      TabIndex        =   0
      ToolTipText     =   "请输入8位准考证号"
      Top             =   1200
      Width           =   1935
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "准考证:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H0000C000&
      Height          =   240
      Left            =   1080
      TabIndex        =   1
      Top             =   1320
      Width           =   960
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Adodc1_WillMove(ByVal adReason As ADODB.EventReasonEnum, adStatus As ADODB.EventStatusEnum, ByVal pRecordset As ADODB.Recordset)

End Sub

Private Sub Form_Load()

    ado.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + App.Path + "\db1.mdb"
    
    ado.CommandType = adCmdText
    
    ado.RecordSource = "select * from db1"
     
    ado.Refresh
   
End Sub

Private Sub Label2_Click()
    
    ado.Recordset.Close
    ado.Recordset.Open "select * from db1 where 准考证号='" + Txt1 + " '"
    
    If ado.Recordset.EOF Then
       MsgBox "数据库中没有你想查询的", 16, "错误"
    Else
       
       Form2.Txt1.Text = ado.Recordset.Fields("姓名").Value
       Form2.Txt2.Text = ado.Recordset.Fields("性别").Value
       Form2.Txt3.Text = ado.Recordset.Fields("语文").Value
       Form2.Txt4.Text = ado.Recordset.Fields("数学").Value
       Form2.Txt5.Text = ado.Recordset.Fields("英语").Value
       Form2.Txt6.Text = ado.Recordset.Fields("综合").Value
       Form2.Txt7.Text = ado.Recordset.Fields("总分").Value
       Form2.Txt8.Text = ado.Recordset.Fields("录取学校").Value
       Form2.Show
       Form2.Caption = RTrim(ado.Recordset.Fields("姓名").Value) & "的成绩"
       
    End If
    
End Sub

⌨️ 快捷键说明

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