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

📄 frmchoice.frm

📁 自
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmChoice 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "指定计算机"
   ClientHeight    =   3465
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   2745
   Icon            =   "frmChoice.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   3465
   ScaleWidth      =   2745
   ShowInTaskbar   =   0   'False
   StartUpPosition =   2  '屏幕中心
   Begin VB.CommandButton Command1 
      Caption         =   "取消"
      Height          =   375
      Left            =   1755
      TabIndex        =   2
      Top             =   690
      Width           =   900
   End
   Begin VB.CommandButton cmdOK 
      Caption         =   "确定"
      Default         =   -1  'True
      Height          =   375
      Left            =   1770
      TabIndex        =   1
      Top             =   210
      Width           =   870
   End
   Begin VB.ListBox lstComputer 
      Height          =   3120
      Left            =   135
      TabIndex        =   0
      Top             =   195
      Width           =   1485
   End
End
Attribute VB_Name = "frmChoice"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Private Sub cmdOK_Click()
    IsUsed(Val(lstComputer.Text) - 1) = True
    intUsed = intUsed + 1
    ReDim Preserve status(0 To intUsed - 1)
    status(intUsed - 1).ComputerID = Val(lstComputer.Text) - 1
    status(intUsed - 1).StudentID = frmMain.txtStudentID.Text
    status(intUsed - 1).Start = Now()
    With frmMain
        .imgComputer(lstComputer.Text - 1).Picture = LoadPicture(App.Path & "\on.bmp")
        
        .lblStudentID.Caption = status(intUsed - 1).StudentID
        .lblComputerID.Caption = Format(status(intUsed - 1).ComputerID + 1, "00")
        .lblStart.Caption = status(intUsed - 1).Start
        .lblEnd.Caption = "(开始上机)"
        .lblTime.Caption = "(开始上机)"
    End With
    Unload Me
End Sub

Private Sub Command1_Click()
    Unload Me
End Sub

Private Sub Form_Load()
    Dim i As Integer
    For i = 0 To 79
        If Not IsUsed(i) Then
            lstComputer.AddItem Format(i + 1, "00")
        End If
    Next
    If lstComputer.ListCount > 0 Then
        lstComputer.ListIndex = 0
    End If
End Sub

⌨️ 快捷键说明

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