哪位朋友帮忙给个单机版的考试系统,用vb+access开发的,有源代码,能够调试运行的,十分感谢! 5

我的邮箱为happyboy9587@163.com帮忙发一个啊... 我的邮箱为happyboy9587@163.com
帮忙发一个啊
展开
 我来答
yfdlcn
2011-04-23 · TA获得超过1973个赞
知道大有可为答主
回答量:3558
采纳率:0%
帮助的人:2335万
展开全部
  去年做了一个。如果想要的话。留个邮箱吧。
  下面是部分内容。
  Option Explicit
  Dim timu() As Integer
  Dim da(), rda() As String
  Dim ts As Integer
  Dim fn As Integer

  Private Sub Command1_Click()
  Dim opt As Integer
  If ts = 1 Then
  MsgBox "已返回题目开始。"
  Exit Sub
  End If
  For opt = Option1.LBound To Option1.UBound
  If Option1(opt).Value Then Option1(opt).Value = False
  Next
  ts = ts - 1
  Data1.Recordset.Move (timu(ts) - timu(ts + 1))
  rda(ts) = Text2.Text
  Label9.Caption = ts
  End Sub

  Private Sub Command2_Click()
  Dim opt As Integer
  If ts = Label4.Caption Then
  MsgBox "题目已全部出完。"
  Exit Sub
  End If
  For opt = Option1.LBound To Option1.UBound
  If Option1(opt).Value Then Option1(opt).Value = False
  Next
  ts = ts + 1
  Data1.Recordset.Move (timu(ts) - timu(ts - 1))
  rda(ts) = Text2.Text
  Label9.Caption = ts
  End Sub

  Private Sub Command3_Click()
  Form2.Show
  Unload Form3
  End Sub

  Private Sub Command4_Click()
  Dim opt As Integer
  Dim yn As Boolean

  For opt = Option1.LBound To Option1.UBound
  If Option1(opt).Value Then yn = True
  Next

  If yn Then
  Label5.Caption = Text2.Text
  Else
  MsgBox "请你先选择答案!"
  End If

  End Sub

  Private Sub Command5_Click()
  Dim opt As Integer
  Dim dyn As Integer
  Dim vyn As Integer

  If ts <> Label4.Caption Then
  vyn = MsgBox("题目尚未答完,是否确定交卷?点击是交卷,点击否重新答题。", vbYesNo)
  If vyn = vbNo Then Exit Sub
  End If

  For opt = 1 To ts
  If da(opt) = rda(opt) Then dyn = dyn + 1
  Next opt
  MsgBox "已回答" + Str(ts) + "道问题,答对" + Str(dyn) + "道。"
  End Sub

  Private Sub Form_Activate()
  Dim cy As Integer
  Dim ccy As Integer
  Dim ccn As Boolean
  Dim drr As Integer
  ReDim timu(1 To Label4.Caption)
  ReDim da(1 To Label4.Caption)
  ReDim rda(1 To Label4.Caption)

  Data1.Recordset.MoveLast
  drr = Data1.Recordset.RecordCount
  Randomize
  timu(1) = Int(drr * Rnd + 1)
  For cy = 2 To Label4.Caption
  timu(cy) = Int(drr * Rnd + 1)
  Do
  ccy = ccy + 1
  If timu(cy) = timu(ccy) Then
  timu(cy) = Int(drr * Rnd + 1)
  ccy = 0
  End If
  If ccy = cy - 1 Then Exit Do
  Loop
  Next cy
  Data1.Recordset.MoveFirst
  ts = 1
  Data1.Recordset.Move (timu(ts) - 1)
  rda(1) = Text2.Text
  Label9.Caption = ts
  End Sub

  Private Sub Form_Unload(Cancel As Integer)
  Form3.Hide
  Form2.Show
  End Sub

  Private Sub Option1_Click(Index As Integer)
  da(ts) = Chr(Index + 65)
  End Sub
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式