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

📄 yesorno.frm

📁 这是一个用VB编写的在线考试系统
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Form4 
   BorderStyle     =   1  'Fixed Single
   ClientHeight    =   2100
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   3525
   LinkTopic       =   "Form4"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   2100
   ScaleWidth      =   3525
   StartUpPosition =   3  '窗口缺省
   Begin VB.Timer Timer1 
      Enabled         =   0   'False
      Interval        =   1000
      Left            =   1560
      Top             =   1560
   End
   Begin VB.CommandButton Command2 
      Caption         =   "不"
      Height          =   375
      Left            =   1920
      TabIndex        =   2
      Top             =   1560
      Width           =   1335
   End
   Begin VB.CommandButton Command1 
      Caption         =   "确定"
      Height          =   375
      Left            =   240
      TabIndex        =   1
      Top             =   1560
      Width           =   1215
   End
   Begin VB.Label Label1 
      Height          =   1215
      Left            =   120
      TabIndex        =   0
      Top             =   120
      Width           =   3255
   End
End
Attribute VB_Name = "Form4"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Declare Function SetWindowPos Lib "user32" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal x As Long, ByVal y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long
Private Sub Command1_Click()
Select Case Me.Caption
Case "你确定要求助教师吗?"
start.Winsock1.SendData "help__me"
Form2.SetFocus
Case "你确定要交卷吗?"
k = 99
Form5.Visible = True
Open App.Path & "\student\" & Form1.Text1.Text & "\data\stu.dat" For Output As #40
Dim i As Integer
Dim j As Integer
For i = 1 To 3
For j = 1 To kaoiq(i, 50)
Print #40, kaoiq(i, j) & Chr(16) & Chr(17)
Next
Next
Close #40
start.Winsock1.SendData "savedata"
Me.Visible = False
Case "信使-教师来信!"
Form2.Visible = True
Form2.SetFocus
Case "从考!"

End Select
Unload Me
End Sub

Private Sub Command2_Click()
If Timer1.Enabled = True Then
Dim tix As Integer
For tix = 1 To 60
Close #tix
Next
Kill App.Path & "\student\" & Form1.Text1.Text & "\data\*.*"
RmDir App.Path & "\student\" & Form1.Text1 & "\data"
RmDir App.Path & "\student\" & Form1.Text1
End
Else
Form2.SetFocus
Unload Me
End If
End Sub

Private Sub Form_Load()
Dim zz As Long
Dim sx, sy As Integer
sx = Screen.Width / 34 + 5
sy = Screen.Height / 34 + 10
zz = SetWindowPos(Me.hwnd, -1, sx, sy, 0, 0, &H1)
End Sub

Private Sub Timer1_Timer()
Static tix As Integer
tix = tix + 1
Form4.Label1.Caption = "你以成功交卷!" & (10 - tix) & "秒后退出系统"
If tix = 10 Then
For tix = 1 To 60
Close #tix
Next
Kill App.Path & "\student\" & Form1.Text1.Text & "\data\*.*"
RmDir App.Path & "\student\" & Form1.Text1 & "\data"
RmDir App.Path & "\student\" & Form1.Text1
End
End If
End Sub

⌨️ 快捷键说明

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