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

📄 frm_querystudent.frm

📁 学生信息的管理是学校经常遇到的问题。学生数量的积聚增加和学生认识制度的改革
💻 FRM
字号:
VERSION 5.00
Object = "{57EA6131-FAB3-49C3-BF10-85A4777A5A7C}#1.0#0"; "XPButton.ocx"
Begin VB.Form frm_querystudent 
   BorderStyle     =   0  'None
   Caption         =   "查询"
   ClientHeight    =   2265
   ClientLeft      =   0
   ClientTop       =   0
   ClientWidth     =   4020
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   151
   ScaleMode       =   3  'Pixel
   ScaleWidth      =   268
   ShowInTaskbar   =   0   'False
   Begin VB.TextBox txtstudentname 
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   330
      Left            =   1860
      MaxLength       =   10
      TabIndex        =   2
      Top             =   975
      Width           =   1815
   End
   Begin VB.TextBox txtstudentid 
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   330
      Left            =   1845
      MaxLength       =   6
      TabIndex        =   0
      Top             =   540
      Width           =   1815
   End
   Begin VB.OptionButton optionstudentname 
      Caption         =   "按姓名查询"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   285
      TabIndex        =   3
      Top             =   960
      Width           =   1590
   End
   Begin VB.OptionButton optionstudentid 
      Caption         =   "按学号查询"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   510
      Left            =   270
      TabIndex        =   1
      Top             =   465
      Value           =   -1  'True
      Width           =   1590
   End
   Begin VB.Frame Frame1 
      Height          =   675
      Left            =   270
      TabIndex        =   4
      Top             =   1365
      Width           =   3465
      Begin XP_Button.XPButton command2 
         Height          =   420
         Left            =   1980
         TabIndex        =   6
         Top             =   165
         Width           =   1365
         _ExtentX        =   2408
         _ExtentY        =   741
         caption         =   "取消"
      End
      Begin XP_Button.XPButton command1 
         Height          =   420
         Left            =   165
         TabIndex        =   5
         Top             =   165
         Width           =   1365
         _ExtentX        =   2408
         _ExtentY        =   741
         caption         =   "确定"
      End
   End
   Begin VB.Label Label1 
      BackStyle       =   0  'Transparent
      Caption         =   "查询"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H8000000E&
      Height          =   345
      Left            =   270
      TabIndex        =   7
      Top             =   60
      Width           =   1020
   End
   Begin VB.Image imglefttitle 
      Height          =   450
      Left            =   0
      Picture         =   "frm_querystudent.frx":0000
      Top             =   0
      Width           =   450
   End
   Begin VB.Image imgleftbottom 
      Height          =   450
      Left            =   15
      Picture         =   "frm_querystudent.frx":0B0A
      Top             =   1815
      Width           =   450
   End
   Begin VB.Image imgrightbottom 
      Height          =   450
      Left            =   3555
      Picture         =   "frm_querystudent.frx":1614
      Top             =   1815
      Width           =   450
   End
   Begin VB.Image imgbottom 
      Height          =   450
      Left            =   450
      Picture         =   "frm_querystudent.frx":211E
      Stretch         =   -1  'True
      Top             =   1815
      Width           =   3105
   End
   Begin VB.Image imgrightwindow 
      Height          =   1665
      Left            =   3555
      Picture         =   "frm_querystudent.frx":8A60
      Stretch         =   -1  'True
      Top             =   420
      Width           =   450
   End
   Begin VB.Image imgleftwindow 
      Height          =   1455
      Left            =   15
      Picture         =   "frm_querystudent.frx":CD7A
      Stretch         =   -1  'True
      Top             =   465
      Width           =   465
   End
   Begin VB.Image imgclose 
      Height          =   240
      Left            =   3660
      Picture         =   "frm_querystudent.frx":1032C
      Top             =   90
      Width           =   240
   End
   Begin VB.Image imgrighttitle 
      Height          =   525
      Left            =   3630
      Picture         =   "frm_querystudent.frx":1066E
      Top             =   -30
      Width           =   375
   End
   Begin VB.Image imgtop 
      Height          =   450
      Left            =   315
      Picture         =   "frm_querystudent.frx":11114
      Stretch         =   -1  'True
      Top             =   15
      Width           =   3315
   End
End
Attribute VB_Name = "frm_querystudent"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim mystd As Cls_student
Dim mystr As String

Private Sub Form_Activate()
    txtstudentid.SetFocus
End Sub

Private Sub Form_Load()
Set mystd = New Cls_student
Set mystd = New Cls_student
    SetWindow Me
    AlwaysOnTop Me, False

txtstudentid = ""
txtstudentname = ""
txtstudentid.Enabled = optionstudentid.Value
txtstudentname.Enabled = optionstudentname.Value
Move (Screen.Width - Me.Width) / 2, (Screen.Height - Me.Height) / 2 '- 800
End Sub



Private Sub command1_Click()
Dim i As Integer
Me.Visible = False
If optionstudentid.Value = True Then
    mystr = Trim(txtstudentid.Text)
    '调用Cls_student中的方法
    mystd.PrcStudentByID mystr
    If mystd.GetPrcStudentRs.EOF = False Then
       finded = True
       DisPlay mystd.GetPrcStudentRs
    Else
       finded = False
       MsgBox "没有该学员的记录!"
    End If
Else
    mystr = Trim(txtstudentname.Text)
    '调用Cls_student中的方法
    mystd.PrcStudentByNM mystr
    If mystd.GetPrcStudentRs.EOF = False Then
       finded = True
       DisPlay mystd.GetPrcStudentRs
    Else
       finded = False
       MsgBox "没有该学员的记录!"
    End If
End If
Unload Me
End Sub
Private Sub command2_Click()
Unload Me
End Sub


Private Sub optionstudentid_Click()
txtstudentid.Enabled = optionstudentid.Value
txtstudentname.Enabled = optionstudentname.Value
txtstudentid = ""
txtstudentname = ""
txtstudentid.SetFocus
End Sub
Private Sub optionstudentname_Click()
txtstudentid.Enabled = optionstudentid.Value
txtstudentname.Enabled = optionstudentname.Value
txtstudentid = ""
txtstudentname = ""
txtstudentname.SetFocus
End Sub


Private Sub txtstudentid_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
command1_Click
End If
End Sub
Private Sub txtstudentname_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
command1_Click
End If
End Sub


Public Function DisPlay(StudentRs As Recordset)
'显示记录
    Dim i As Integer
    For i = 0 To 12
      frm_addnewstudent.Text1(i) = Trim(StudentRs.Fields(i))
    Next
    For i = 0 To 4
      frm_addnewstudent.Combo1(i) = Trim(StudentRs.Fields(i + 13))
    Next
End Function
Private Sub imgclose_Click()
    Unload Me
End Sub


Private Sub imglefttitle_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
    DrawForms Me
End Sub

Private Sub imgtop_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
    DrawForms Me
End Sub


Private Sub imgrighttitle_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
   DrawForms Me
End Sub

⌨️ 快捷键说明

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