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

📄 服务器管理.frm

📁 这是一个用VB编写的在线考试系统
💻 FRM
📖 第 1 页 / 共 2 页
字号:
         Height          =   255
         Index           =   2
         Left            =   240
         TabIndex        =   47
         Top             =   1320
         Width           =   975
      End
      Begin VB.Label Label7 
         Caption         =   "上限:"
         Height          =   255
         Index           =   2
         Left            =   240
         TabIndex        =   46
         Top             =   960
         Width           =   735
      End
      Begin VB.Label Label6 
         Caption         =   "下限:"
         Height          =   255
         Index           =   2
         Left            =   240
         TabIndex        =   45
         Top             =   600
         Width           =   735
      End
      Begin VB.Label Label5 
         Caption         =   "文件名:"
         Height          =   255
         Index           =   2
         Left            =   240
         TabIndex        =   44
         Top             =   240
         Width           =   855
      End
   End
   Begin VB.Frame Frame2 
      Caption         =   "多选题"
      Height          =   1695
      Index           =   1
      Left            =   120
      TabIndex        =   22
      Top             =   3480
      Width           =   4095
      Begin VB.TextBox Text7 
         Height          =   270
         Index           =   1
         Left            =   1200
         TabIndex        =   30
         Top             =   1320
         Width           =   495
      End
      Begin VB.VScrollBar VScroll3 
         Height          =   255
         Index           =   1
         Left            =   1680
         Max             =   100
         Min             =   1
         TabIndex        =   29
         Top             =   960
         Value           =   1
         Width           =   255
      End
      Begin VB.TextBox Text6 
         Height          =   270
         Index           =   1
         Left            =   1200
         TabIndex        =   28
         Top             =   960
         Width           =   495
      End
      Begin VB.VScrollBar VScroll2 
         Height          =   255
         Index           =   1
         Left            =   1680
         Max             =   100
         Min             =   1
         TabIndex        =   27
         Top             =   600
         Value           =   1
         Width           =   255
      End
      Begin VB.TextBox Text5 
         Height          =   270
         Index           =   1
         Left            =   1200
         TabIndex        =   26
         Top             =   600
         Width           =   495
      End
      Begin VB.CommandButton Command1 
         Caption         =   "浏览"
         Height          =   375
         Index           =   1
         Left            =   3120
         TabIndex        =   25
         Top             =   210
         Width           =   615
      End
      Begin VB.TextBox Text4 
         Height          =   270
         Index           =   1
         Left            =   1200
         TabIndex        =   24
         Top             =   240
         Width           =   1815
      End
      Begin VB.VScrollBar VScroll4 
         Height          =   255
         Index           =   1
         Left            =   1680
         Max             =   100
         Min             =   1
         TabIndex        =   23
         Top             =   1320
         Value           =   1
         Width           =   255
      End
      Begin VB.Label Label8 
         Caption         =   "所出题数:"
         Height          =   255
         Index           =   1
         Left            =   240
         TabIndex        =   34
         Top             =   1320
         Width           =   975
      End
      Begin VB.Label Label7 
         Caption         =   "上限:"
         Height          =   255
         Index           =   1
         Left            =   240
         TabIndex        =   33
         Top             =   960
         Width           =   735
      End
      Begin VB.Label Label6 
         Caption         =   "下限:"
         Height          =   255
         Index           =   1
         Left            =   240
         TabIndex        =   32
         Top             =   600
         Width           =   735
      End
      Begin VB.Label Label5 
         Caption         =   "文件名:"
         Height          =   255
         Index           =   1
         Left            =   240
         TabIndex        =   31
         Top             =   240
         Width           =   855
      End
   End
   Begin VB.Frame Frame2 
      Caption         =   "单选题"
      Height          =   1695
      Index           =   0
      Left            =   120
      TabIndex        =   9
      Top             =   1680
      Width           =   4095
      Begin VB.VScrollBar VScroll4 
         Height          =   255
         Index           =   0
         Left            =   1680
         Max             =   100
         Min             =   1
         TabIndex        =   21
         Top             =   1320
         Value           =   1
         Width           =   255
      End
      Begin VB.TextBox Text4 
         Height          =   270
         Index           =   0
         Left            =   1200
         TabIndex        =   16
         Top             =   240
         Width           =   1815
      End
      Begin VB.CommandButton Command1 
         Caption         =   "浏览"
         Height          =   375
         Index           =   0
         Left            =   3120
         TabIndex        =   15
         Top             =   210
         Width           =   615
      End
      Begin VB.TextBox Text5 
         Height          =   270
         Index           =   0
         Left            =   1200
         TabIndex        =   14
         Top             =   600
         Width           =   495
      End
      Begin VB.VScrollBar VScroll2 
         Height          =   255
         Index           =   0
         Left            =   1680
         Max             =   100
         Min             =   1
         TabIndex        =   13
         Top             =   600
         Value           =   1
         Width           =   255
      End
      Begin VB.TextBox Text6 
         Height          =   270
         Index           =   0
         Left            =   1200
         TabIndex        =   12
         Top             =   960
         Width           =   495
      End
      Begin VB.VScrollBar VScroll3 
         Height          =   255
         Index           =   0
         Left            =   1680
         Max             =   100
         Min             =   1
         TabIndex        =   11
         Top             =   960
         Value           =   1
         Width           =   255
      End
      Begin VB.TextBox Text7 
         Height          =   270
         Index           =   0
         Left            =   1200
         TabIndex        =   10
         Top             =   1320
         Width           =   495
      End
      Begin VB.Label Label5 
         Caption         =   "文件名:"
         Height          =   255
         Index           =   0
         Left            =   240
         TabIndex        =   20
         Top             =   240
         Width           =   855
      End
      Begin VB.Label Label6 
         Caption         =   "下限:"
         Height          =   255
         Index           =   0
         Left            =   240
         TabIndex        =   19
         Top             =   600
         Width           =   735
      End
      Begin VB.Label Label7 
         Caption         =   "上限:"
         Height          =   255
         Index           =   0
         Left            =   240
         TabIndex        =   18
         Top             =   960
         Width           =   735
      End
      Begin VB.Label Label8 
         Caption         =   "所出题数:"
         Height          =   255
         Index           =   0
         Left            =   240
         TabIndex        =   17
         Top             =   1320
         Width           =   975
      End
   End
   Begin MSComDlg.CommonDialog CommDial 
      Left            =   4020
      Top             =   0
      _ExtentX        =   847
      _ExtentY        =   847
      _Version        =   393216
      Filter          =   "题库文件|*.dat"
   End
   Begin VB.Frame Frame1 
      Caption         =   "服务器"
      Height          =   1575
      Left            =   120
      TabIndex        =   0
      Top             =   0
      Width           =   4095
      Begin VB.VScrollBar VScroll5 
         Enabled         =   0   'False
         Height          =   255
         Left            =   1800
         Max             =   120
         Min             =   60
         TabIndex        =   93
         Top             =   1200
         Value           =   60
         Width           =   255
      End
      Begin VB.TextBox Text8 
         Enabled         =   0   'False
         Height          =   270
         Left            =   1320
         TabIndex        =   92
         Top             =   1200
         Width           =   495
      End
      Begin VB.TextBox Text1 
         Height          =   270
         Left            =   1560
         TabIndex        =   4
         Top             =   210
         Width           =   2175
      End
      Begin VB.TextBox Text2 
         Height          =   270
         Left            =   1560
         TabIndex        =   3
         Top             =   500
         Width           =   2175
      End
      Begin VB.TextBox Text3 
         Enabled         =   0   'False
         Height          =   270
         Left            =   1320
         TabIndex        =   2
         Top             =   840
         Width           =   495
      End
      Begin VB.VScrollBar VScroll1 
         Enabled         =   0   'False
         Height          =   255
         Left            =   1800
         Max             =   6
         Min             =   5
         TabIndex        =   1
         Top             =   860
         Value           =   5
         Width           =   255
      End
      Begin VB.Label Label11 
         Caption         =   "分钟"
         Height          =   255
         Left            =   2160
         TabIndex        =   94
         Top             =   1240
         Width           =   495
      End
      Begin VB.Label Label10 
         Caption         =   "考试时间:"
         Height          =   255
         Left            =   240
         TabIndex        =   91
         Top             =   1200
         Width           =   975
      End
      Begin VB.Label Label1 
         Caption         =   "服务器的名字:"
         Height          =   255
         Left            =   240
         TabIndex        =   8
         Top             =   240
         Width           =   1455
      End
      Begin VB.Label Label2 
         Caption         =   "服务器的端口:"
         Height          =   255
         Left            =   240
         TabIndex        =   7
         Top             =   480
         Width           =   1455
      End
      Begin VB.Label Label3 
         Caption         =   "考试共有:"
         Height          =   255
         Left            =   240
         TabIndex        =   6
         Top             =   840
         Width           =   975
      End
      Begin VB.Label Label4 
         Caption         =   "题类"
         Height          =   255
         Left            =   2160
         TabIndex        =   5
         Top             =   900
         Width           =   615
      End
   End
End
Attribute VB_Name = "Form7"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Private Sub Command1_Click(Index As Integer)
CommDial.ShowOpen
Dim s As String
s = CommDial.FileName
Dim q As Integer
For q = 1 To Len(s)
If Mid(s, Len(s) - q, 1) = "\" Then
Text4(Index).Text = Trim(Right(s, q))
s = ""
Exit For
End If
Next
End Sub

Private Sub Command2_Click()
Open App.Path & "\..\config.dat" For Output As #21
Print #21, Text1.Text & Chr(16) & Chr(17)
Print #21, Text2.Text & Chr(16) & Chr(17)
Print #21, Text8.Text & Chr(16) & Chr(17)
Print #21, Text3.Text & Chr(16) & Chr(17)
Dim j As Integer
For j = 0 To (Val(Text3.Text) - 1)
Print #21, Text4(j).Text & Chr(16) & Chr(17)
Print #21, Text5(j).Text & Chr(16) & Chr(17)
Print #21, Text6(j).Text & Chr(16) & Chr(17)
Print #21, Text7(j).Text & Chr(16) & Chr(17)
Next
Print #21, "inf.dat" & Chr(16) & Chr(17)
Close #21
MsgBox "数据以成功写入文件!"
End Sub

Private Sub Command3_Click()
Form1.Visible = True
Form1.SetFocus
Unload Me
End Sub

Private Sub Form_Load()
Open App.Path & "\..\config.dat" For Binary As #21
Text1.Text = readfile(0, 21, 0)
Text2.Text = readfile(0, 21, 0)
Text8.Text = readfile(0, 21, 0)
Text3.Text = readfile(0, 21, 0)
VScroll1.Value = Val(Text3.Text)
Dim i As Integer
For i = 0 To (Val(Text3.Text) - 1)
Frame2(i).Enabled = True
Text4(i).Text = readfile(0, 21, 0)
Text5(i).Text = readfile(0, 21, 0)
Text6(i).Text = readfile(0, 21, 0)
Text7(i).Text = readfile(0, 21, 0)
VScroll2(i).Value = Val(Text5(i).Text)
VScroll3(i).Value = Val(Text6(i).Text)
VScroll4(i).Value = Val(Text7(i).Text)
Next
Close #21
For i = Val(Text3.Text) To 5
Frame2(i).Enabled = False
Next
End Sub

Private Sub Form_Unload(Cancel As Integer)
Form1.Visible = True
Form1.SetFocus
End Sub

Private Sub Text5_Change(Index As Integer)
VScroll2(Index).Value = Val(Trim(Text5(Index).Text))
End Sub

Private Sub Text6_Change(Index As Integer)
VScroll3(Index).Value = Val(Trim(Text6(Index).Text))
End Sub

Private Sub Text7_Change(Index As Integer)
VScroll4(Index).Value = Val(Trim(Text7(Index).Text))
End Sub

Private Sub VScroll2_Change(Index As Integer)
Text5(Index).Text = Trim(Str(VScroll2(Index).Value))
End Sub

Private Sub VScroll3_Change(Index As Integer)
Text6(Index).Text = Trim(Str(VScroll3(Index).Value))
End Sub

Private Sub VScroll4_Change(Index As Integer)
Text7(Index).Text = Trim(Str(VScroll4(Index).Value))
End Sub

Private Sub VScroll5_Change()
Text8.Text = Trim(Str(VScroll5.Value))
End Sub

⌨️ 快捷键说明

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