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

📄 selectclass.frm

📁 是我应我们学校学工部做的软件,其主要是解决想我们学校这样的条件--各个办公室之间还没有建立联网,而且学校分为两个校区(又不在一个城市).   因此
💻 FRM
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "mscomctl.ocx"
Begin VB.Form selectclass 
   BorderStyle     =   4  'Fixed ToolWindow
   Caption         =   "选择班级"
   ClientHeight    =   5445
   ClientLeft      =   45
   ClientTop       =   270
   ClientWidth     =   8370
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   5445
   ScaleWidth      =   8370
   ShowInTaskbar   =   0   'False
   StartUpPosition =   1  'CenterOwner
   Begin VB.Frame Frame1 
      Height          =   255
      Left            =   2640
      TabIndex        =   7
      Top             =   4560
      Width           =   5655
   End
   Begin VB.CommandButton Command4 
      Cancel          =   -1  'True
      Caption         =   "取    消(&C)"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   9.75
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   6480
      TabIndex        =   2
      Top             =   4920
      Width           =   1815
   End
   Begin VB.CommandButton Command2 
      Caption         =   "选  择(&Y)"
      Default         =   -1  'True
      Enabled         =   0   'False
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   9.75
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   4440
      TabIndex        =   1
      Top             =   4920
      Width           =   1815
   End
   Begin VB.PictureBox Picture1 
      BackColor       =   &H00FFE09E&
      Height          =   4815
      Left            =   0
      Picture         =   "selectclass.frx":0000
      ScaleHeight     =   4755
      ScaleWidth      =   2475
      TabIndex        =   3
      Top             =   0
      Width           =   2535
      Begin VB.Image Image1 
         Height          =   720
         Left            =   120
         Picture         =   "selectclass.frx":3A064
         Stretch         =   -1  'True
         Top             =   120
         Width           =   720
      End
      Begin VB.Label Label1 
         BackStyle       =   0  'Transparent
         Caption         =   "  请您选择您要进行学生名册管理的班级。"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   11.25
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00FF0000&
         Height          =   1335
         Left            =   120
         TabIndex        =   6
         Top             =   1200
         Width           =   2055
      End
      Begin VB.Label Label5 
         BackStyle       =   0  'Transparent
         Caption         =   "选择班级"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   14.25
            Charset         =   134
            Weight          =   700
            Underline       =   0   'False
            Italic          =   -1  'True
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00800000&
         Height          =   375
         Index           =   1
         Left            =   1005
         TabIndex        =   4
         Top             =   525
         Width           =   1335
      End
      Begin VB.Shape Shape1 
         BorderColor     =   &H000000FF&
         BorderWidth     =   2
         Height          =   15
         Left            =   120
         Top             =   960
         Width           =   2175
      End
      Begin VB.Shape Shape2 
         BorderColor     =   &H0000FF00&
         BorderWidth     =   2
         Height          =   15
         Left            =   120
         Top             =   1000
         Width           =   2055
      End
      Begin VB.Label Label5 
         BackStyle       =   0  'Transparent
         Caption         =   "选择班级"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   14.25
            Charset         =   134
            Weight          =   700
            Underline       =   0   'False
            Italic          =   -1  'True
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00FFFFFF&
         Height          =   375
         Index           =   0
         Left            =   980
         TabIndex        =   5
         Top             =   500
         Width           =   1335
      End
   End
   Begin MSComctlLib.TreeView TreeView1 
      Height          =   4575
      Left            =   2640
      TabIndex        =   0
      Top             =   0
      Width           =   5655
      _ExtentX        =   9975
      _ExtentY        =   8070
      _Version        =   393217
      HideSelection   =   0   'False
      LabelEdit       =   1
      Style           =   7
      ImageList       =   "ImageList1"
      BorderStyle     =   1
      Appearance      =   1
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
   End
   Begin MSComctlLib.ImageList ImageList1 
      Left            =   3840
      Top             =   4800
      _ExtentX        =   1005
      _ExtentY        =   1005
      BackColor       =   -2147483643
      ImageWidth      =   16
      ImageHeight     =   16
      MaskColor       =   12632256
      _Version        =   393216
      BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
         NumListImages   =   5
         BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "selectclass.frx":3A946
            Key             =   ""
         EndProperty
         BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "selectclass.frx":3B79A
            Key             =   ""
         EndProperty
         BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "selectclass.frx":3DF4E
            Key             =   ""
         EndProperty
         BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "selectclass.frx":3EDA2
            Key             =   ""
         EndProperty
         BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "selectclass.frx":3F67E
            Key             =   ""
         EndProperty
      EndProperty
   End
End
Attribute VB_Name = "selectclass"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public yesno As Boolean
Public nn As String
Public kk As Integer
Private Sub Command2_Click()
    yesno = True
    kk = Right(TreeView1.SelectedItem.Key, Len(TreeView1.SelectedItem.Key) - 1)
    nn = TreeView1.SelectedItem.Parent.Parent.Parent.Text & TreeView1.SelectedItem.Parent.Parent.Text & TreeView1.SelectedItem.Parent.Text & TreeView1.SelectedItem.Text
    Unload Me
End Sub

Private Sub Command4_Click()
    Unload Me
End Sub

Private Sub Form_Load()
     '初始窗体
     yesno = False
   Dim nodX As Node
   Set nodX = TreeView1.Nodes.Add(, , "R", "西安科技学院", 1)
   
   Dim xu As New ADODB.Recordset
   Dim zy As New ADODB.Recordset
   Dim nj As New ADODB.Recordset
   Dim ban As New ADODB.Recordset
   
   xu.Open "select * from [xb]", main.connect, 3, 2
  
   For i = 1 To xu.RecordCount
        Set nodX = TreeView1.Nodes.Add("R", tvwChild, "X" & xu.Fields(0), xu.Fields(1) & "系", 2)
        zy.Open "select * from [zy] where [xid]=" & xu.Fields(0), main.connect, 3, 2
        For i1 = 1 To zy.RecordCount
            Set nodX = TreeView1.Nodes.Add("X" & xu.Fields(0), tvwChild, "Z" & zy.Fields(0), zy.Fields(1) & "专业", 3)
            nj.Open "select * from [yc] where [zyid]=" & zy.Fields(0), main.connect, 3, 2
            For i2 = 1 To nj.RecordCount
                Set nodX = TreeView1.Nodes.Add("Z" & zy.Fields(0), tvwChild, "N" & nj.Fields(0), nj.Fields(1) & "级", 4)
                ban.Open "select * from [class] where [yid]=" & nj.Fields(0), main.connect, 3, 2
                For i3 = 1 To ban.RecordCount
                    Set nodX = TreeView1.Nodes.Add("N" & nj.Fields(0), tvwChild, "B" & ban.Fields(0), ban.Fields(1) & "班", 5)
                    ban.MoveNext
                Next
                ban.Close
                nj.MoveNext
            Next
            nj.Close
            zy.MoveNext
        Next
        zy.Close
        xu.MoveNext
   Next
   yesno = False
   SendKeys "{RIGHT}"
End Sub

Private Sub TreeView1_DblClick()
    a = Left(TreeView1.SelectedItem.Key, 1)
    If a = "B" Then Command2_Click
End Sub

Private Sub TreeView1_NodeClick(ByVal Node As MSComctlLib.Node)
    a = Left(Node.Key, 1)
    If a = "B" Then Command2.Enabled = True Else Command2.Enabled = False
End Sub

⌨️ 快捷键说明

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