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

📄 frmtitle.frm

📁 一款非常适合中小学教学任务不是很繁重的管理程序
💻 FRM
字号:
VERSION 5.00
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX"
Object = "{E95A2510-F3D1-416D-823B-4F840FE98091}#3.0#0"; "Command.ocx"
Object = "{3A6644DE-3402-11D9-9DE7-C33FAA87690A}#1.0#0"; "WinXPCEngine.ocx"
Begin VB.Form frmTitle 
   ClientHeight    =   8295
   ClientLeft      =   60
   ClientTop       =   60
   ClientWidth     =   10110
   ControlBox      =   0   'False
   LinkTopic       =   "Form1"
   MDIChild        =   -1  'True
   Picture         =   "frmTitle.frx":0000
   ScaleHeight     =   8295
   ScaleWidth      =   10110
   WindowState     =   2  'Maximized
   Begin WinXPC_Engine.WindowsXPC WindowsXPC1 
      Left            =   3195
      Top             =   3825
      _ExtentX        =   6588
      _ExtentY        =   1085
      ColorScheme     =   2
      Common_Dialog   =   0   'False
   End
   Begin VB.ComboBox cboStudent 
      Height          =   315
      Left            =   4800
      Style           =   2  'Dropdown List
      TabIndex        =   11
      Top             =   1920
      Width           =   1695
   End
   Begin VB.TextBox txtNum 
      Alignment       =   2  'Center
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   12
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   3240
      TabIndex        =   9
      Top             =   1800
      Width           =   1215
   End
   Begin VB.ComboBox cboType 
      Height          =   315
      ItemData        =   "frmTitle.frx":151DA4
      Left            =   3240
      List            =   "frmTitle.frx":151DB1
      Style           =   2  'Dropdown List
      TabIndex        =   2
      Top             =   1320
      Width           =   3255
   End
   Begin CSCommand.Command cmdFind 
      Height          =   375
      Left            =   6600
      TabIndex        =   3
      Top             =   1320
      Width           =   735
      _ExtentX        =   1296
      _ExtentY        =   661
      IconAlign       =   0
      Icon            =   "frmTitle.frx":151DD3
      Caption         =   "显示"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
   End
   Begin CSCommand.Command cmdExit 
      Height          =   375
      Left            =   6720
      TabIndex        =   4
      Top             =   7560
      Width           =   975
      _ExtentX        =   1720
      _ExtentY        =   661
      IconAlign       =   0
      Icon            =   "frmTitle.frx":151DEF
      Caption         =   "关闭"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
   End
   Begin CSCommand.Command cmdModiy 
      Height          =   375
      Left            =   2640
      TabIndex        =   5
      Top             =   7560
      Width           =   975
      _ExtentX        =   1720
      _ExtentY        =   661
      IconAlign       =   0
      Icon            =   "frmTitle.frx":151E0B
      Caption         =   "修改"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
   End
   Begin CSCommand.Command cmdPrint 
      Height          =   375
      Left            =   3960
      TabIndex        =   6
      Top             =   7560
      Width           =   975
      _ExtentX        =   1720
      _ExtentY        =   661
      IconAlign       =   0
      Icon            =   "frmTitle.frx":151E27
      Caption         =   "打印"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
   End
   Begin CSCommand.Command cmdRSet 
      Height          =   375
      Left            =   5400
      TabIndex        =   7
      Top             =   7560
      Width           =   975
      _ExtentX        =   1720
      _ExtentY        =   661
      IconAlign       =   0
      Icon            =   "frmTitle.frx":151E43
      Caption         =   "修改人数"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
   End
   Begin MSFlexGridLib.MSFlexGrid mgridAll 
      Height          =   4695
      Left            =   2640
      TabIndex        =   8
      Top             =   2400
      Width           =   5055
      _ExtentX        =   8916
      _ExtentY        =   8281
      _Version        =   393216
      FixedRows       =   0
      FixedCols       =   0
      ForeColor       =   8388608
      BackColorFixed  =   16512
      ForeColorFixed  =   8388736
      ForeColorSel    =   65535
      BackColorBkg    =   16777215
      GridColorFixed  =   4210752
      WordWrap        =   -1  'True
   End
   Begin VB.Label Label2 
      BackStyle       =   0  'Transparent
      Caption         =   "人数"
      Height          =   255
      Index           =   1
      Left            =   2520
      TabIndex        =   10
      Top             =   1920
      Width           =   495
   End
   Begin VB.Label Label2 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "类型"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   9.75
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   240
      Index           =   0
      Left            =   2520
      TabIndex        =   1
      Top             =   1320
      Width           =   390
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "优秀称号"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   24
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   555
      Left            =   3960
      TabIndex        =   0
      Top             =   360
      Width           =   1860
   End
End
Attribute VB_Name = "frmTitle"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim strSql As String
Dim RS As ADODB.Recordset
Private Sub cboStudent_Change()
Me.mgridAll.Text = Me.cboStudent.Text
End Sub
Private Sub cboStudent_Click()
Me.mgridAll.Text = Me.cboStudent.Text
End Sub
Private Sub cmdExit_Click()
Unload Me
End Sub
Private Sub cmdFind_Click()
'查找
On Error Resume Next
strSql = "select " & Trim(cboType.Text) & "表.学号,学生基本情况表.姓名"
strSql = strSql & " from " & Trim(cboType.Text) & "表,学生基本情况表 where "
strSql = strSql & "" & Trim(cboType.Text) & "表.学号=学生基本情况表.学号"
writeMS strSql, Me.mgridAll
Me.mgridAll.Rows = Me.mgridAll.Rows - 1
Me.txtNum.Text = Me.mgridAll.Rows - 1
End Sub
Private Sub cmdModiy_Click()
'修改
On Error Resume Next
Dim i As Integer
strSql = "delete * from " & Trim(cboType.Text) & "表"
dbOperate strSql
For i = 1 To Me.mgridAll.Rows - 1
    strSql = "insert into " & Trim(cboType.Text) & "表 values('"
    strSql = strSql & Trim(Me.mgridAll.TextMatrix(i, 0)) & "')"
    dbOperate strSql
Next i
End Sub
Private Sub cmdPrint_Click()
'打印
Me.cboStudent.Visible = False
writeMSFlexGrid Me.mgridAll, Trim(cboType.Text) & "表"
End Sub
Private Sub cmdRSet_Click()
'人数的变化
Me.mgridAll.Rows = Val(Trim(txtNum.Text)) + 1
End Sub
Private Sub Form_Load()
'初始化数据
On Error Resume Next
Me.cboType.ListIndex = 0
strSql = "select 学号 from 学生基本情况表"
Set RS = dbSelect(strSql)
While Not RS.EOF
    cboStudent.AddItem RS.Fields(0)
    RS.MoveNext
Wend
cboStudent.Visible = False
Me.WindowsXPC1.InitSubClassing
End Sub
Private Sub mgridAll_Click()
Call mgridAll_RowColChange
End Sub

Private Sub mgridAll_RowColChange()
'cboType的移动
If Me.mgridAll.Row <> 0 And Me.mgridAll.Col = 0 Then
    Me.cboStudent.Visible = True
    Me.cboStudent.Left = Me.mgridAll.CellLeft + Me.mgridAll.Left
    Me.cboStudent.Top = Me.mgridAll.CellTop + Me.mgridAll.Top
Else
    Me.cboStudent.Visible = False
End If
End Sub
Private Sub txtNum_Change()
If Not IsNumeric(Trim(txtNum.Text)) Then
    MsgBox "请输入数字!", vbOKCancelvbok + vbExclamation, "提示"
End If
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Me.cboStudent.Visible = False
End Sub

⌨️ 快捷键说明

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