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

📄 frmcourse.frm

📁 这是一个学生学籍管理系统
💻 FRM
字号:
VERSION 5.00
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX"
Begin VB.Form frmCourse 
   Caption         =   "课表查询"
   ClientHeight    =   5415
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   8190
   Icon            =   "frmCourse.frx":0000
   LinkTopic       =   "Form1"
   MDIChild        =   -1  'True
   ScaleHeight     =   5415
   ScaleWidth      =   8190
   Begin MSFlexGridLib.MSFlexGrid fgList 
      Height          =   4335
      Left            =   0
      TabIndex        =   8
      Top             =   1080
      Width           =   8175
      _ExtentX        =   14420
      _ExtentY        =   7646
      _Version        =   393216
      AllowUserResizing=   3
   End
   Begin VB.Frame Frame1 
      Height          =   975
      Left            =   0
      TabIndex        =   0
      Top             =   0
      Width           =   8175
      Begin VB.CommandButton btnSearch 
         Caption         =   "搜索"
         Height          =   375
         Left            =   6120
         TabIndex        =   7
         Top             =   360
         Width           =   855
      End
      Begin VB.TextBox txbOne 
         Height          =   375
         Left            =   600
         TabIndex        =   3
         Top             =   360
         Width           =   1575
      End
      Begin VB.TextBox txbTwo 
         Enabled         =   0   'False
         Height          =   375
         Left            =   2880
         TabIndex        =   2
         Top             =   360
         Width           =   975
      End
      Begin VB.TextBox txbThree 
         Enabled         =   0   'False
         Height          =   375
         Left            =   4680
         TabIndex        =   1
         Top             =   360
         Width           =   975
      End
      Begin VB.Label Label1 
         Caption         =   "学号"
         Height          =   255
         Left            =   120
         TabIndex        =   6
         Top             =   480
         Width           =   615
      End
      Begin VB.Label Label2 
         Caption         =   "姓名"
         Height          =   255
         Left            =   2520
         TabIndex        =   5
         Top             =   480
         Width           =   615
      End
      Begin VB.Label Label3 
         Caption         =   "班级"
         Height          =   255
         Left            =   4200
         TabIndex        =   4
         Top             =   480
         Width           =   495
      End
   End
End
Attribute VB_Name = "frmCourse"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public Sub LoadData()
    Dim strFilter As String
    If Len(Trim(txbOne.Text)) = 0 Then
        Exit Sub
    Else
        strFilter = " and 学号='" + Trim(txbOne.Text) + "'"
    End If
    Dim db As New DataBases
    Dim strSQL As String
    strSQL = "select 姓名, 班级名称 from 学生信息 as a, 班级信息 as b where a.班级编号=b.班级编号 and 学号='" + Trim(Me.txbOne.Text) + "'"
    Dim rs As Recordset
    Set rs = db.RunSelectSQL(strSQL)
    If rs.RecordCount = 0 Then
        MsgBox ("学号错误!")
        Exit Sub
    End If
    Me.txbTwo.Text = Trim(rs(0))
    Me.txbThree.Text = Trim(rs(1))
    strSQL = "select b.课程名称,a.上课时间天,a.上课时间节,a.上课地点 from 选课表 as c, 课程表 as a, 课程信息 as b where a.课程编号=b.课程编号 and c.课序号=a.课序号"
    Set rs = db.RunSelectSQL(strSQL + strFilter + " order by a.课序号 ")
    For m = 1 To 5
        For n = 1 To 10
            fgList.TextMatrix(n, m) = ""
        Next
    Next
    Dim col As Integer
    Dim line As Integer
    While (Not rs.EOF)
        col = CInt(CStr(rs(1)))
        line = CInt(rs(2))
        fgList.TextMatrix(line, col) = Trim(rs(0)) + "  " + Trim(rs(3))
        rs.MoveNext
    Wend
End Sub

Private Sub btnSearch_Click()
    LoadData
End Sub

Private Sub Form_Load()
    fgList.Cols = 6
    fgList.Rows = 11
    For i = 1 To 10
        fgList.TextMatrix(i, 0) = i
    Next
    fgList.TextMatrix(0, 1) = "星期一"
    fgList.TextMatrix(0, 2) = "星期二"
    fgList.TextMatrix(0, 3) = "星期三"
    fgList.TextMatrix(0, 4) = "星期四"
    fgList.TextMatrix(0, 5) = "星期五"
    LoadData
End Sub

⌨️ 快捷键说明

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