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

📄 form7.frm

📁 用vb编写的网上试题库对你学习VB很有帮助!
💻 FRM
字号:
VERSION 5.00
Object = "{EAB22AC0-30C1-11CF-A7EB-0000C05BAE0B}#1.1#0"; "shdocvw.dll"
Object = "{6BF52A50-394A-11D3-B153-00C04F79FAA6}#1.0#0"; "wmp.dll"
Begin VB.Form 试题显示 
   Caption         =   "                         试题显示"
   ClientHeight    =   8430
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   8250
   LinkTopic       =   "Form7"
   Picture         =   "Form7.frx":0000
   ScaleHeight     =   8430
   ScaleWidth      =   8250
   StartUpPosition =   3  '窗口缺省
   Begin VB.CommandButton Command1 
      Caption         =   "提交并显示答案"
      Height          =   495
      Left            =   3360
      TabIndex        =   8
      Top             =   7800
      Width           =   1695
   End
   Begin VB.CommandButton Command2 
      Caption         =   "播放听力"
      Height          =   495
      Left            =   2160
      TabIndex        =   7
      Top             =   7800
      Width           =   1215
   End
   Begin VB.CommandButton Command3 
      Caption         =   "返回上一目录"
      Height          =   495
      Left            =   5040
      TabIndex        =   6
      Top             =   7800
      Width           =   1215
   End
   Begin VB.Data Data2 
      Caption         =   "Data2"
      Connect         =   "Access 2000;"
      DatabaseName    =   ""
      DefaultCursorType=   0  '缺省游标
      DefaultType     =   2  '使用 ODBC
      Exclusive       =   0   'False
      Height          =   285
      Left            =   1080
      Options         =   0
      ReadOnly        =   0   'False
      RecordsetType   =   1  'Dynaset
      RecordSource    =   ""
      Top             =   8160
      Visible         =   0   'False
      Width           =   1140
   End
   Begin VB.TextBox Text1 
      Height          =   495
      Left            =   2640
      TabIndex        =   5
      Top             =   120
      Width           =   2655
   End
   Begin SHDocVwCtl.WebBrowser WebBrowser1 
      Height          =   6855
      Left            =   120
      TabIndex        =   3
      Top             =   840
      Width           =   8175
      ExtentX         =   14420
      ExtentY         =   12091
      ViewMode        =   0
      Offline         =   0
      Silent          =   0
      RegisterAsBrowser=   0
      RegisterAsDropTarget=   1
      AutoArrange     =   0   'False
      NoClientEdge    =   0   'False
      AlignLeft       =   0   'False
      NoWebView       =   0   'False
      HideFileNames   =   0   'False
      SingleClick     =   0   'False
      SingleSelection =   0   'False
      NoFolders       =   0   'False
      Transparent     =   0   'False
      ViewID          =   "{0057D0E0-3573-11CF-AE69-08002B2E1262}"
      Location        =   "http:///"
   End
   Begin VB.Data Data1 
      Caption         =   "Data1"
      Connect         =   "Access 2000;"
      DatabaseName    =   ""
      DefaultCursorType=   0  '缺省游标
      DefaultType     =   2  '使用 ODBC
      Exclusive       =   0   'False
      Height          =   285
      Left            =   0
      Options         =   0
      ReadOnly        =   0   'False
      RecordsetType   =   1  'Dynaset
      RecordSource    =   ""
      Top             =   8160
      Visible         =   0   'False
      Width           =   1140
   End
   Begin VB.Label Label4 
      BackStyle       =   0  'Transparent
      Caption         =   "试卷名称"
      Height          =   495
      Left            =   1560
      TabIndex        =   9
      Top             =   240
      Width           =   1095
   End
   Begin WMPLibCtl.WindowsMediaPlayer WindowsMediaPlayer1 
      Height          =   1575
      Left            =   360
      TabIndex        =   4
      Top             =   2160
      Visible         =   0   'False
      Width           =   2295
      URL             =   ""
      rate            =   1
      balance         =   0
      currentPosition =   0
      defaultFrame    =   ""
      playCount       =   1
      autoStart       =   -1  'True
      currentMarker   =   0
      invokeURLs      =   -1  'True
      baseURL         =   ""
      volume          =   50
      mute            =   0   'False
      uiMode          =   "full"
      stretchToFit    =   0   'False
      windowlessVideo =   0   'False
      enabled         =   -1  'True
      enableContextMenu=   -1  'True
      fullScreen      =   0   'False
      SAMIStyle       =   ""
      SAMILang        =   ""
      SAMIFilename    =   ""
      captioningID    =   ""
      enableErrorDialogs=   0   'False
      _cx             =   4048
      _cy             =   2778
   End
   Begin VB.Label Label3 
      Caption         =   "Label3"
      Height          =   615
      Left            =   360
      TabIndex        =   2
      Top             =   0
      Visible         =   0   'False
      Width           =   255
   End
   Begin VB.Label Label2 
      Caption         =   "Label2"
      Height          =   615
      Left            =   240
      TabIndex        =   1
      Top             =   0
      Visible         =   0   'False
      Width           =   135
   End
   Begin VB.Label Label1 
      Caption         =   "Label1"
      Height          =   495
      Left            =   120
      TabIndex        =   0
      Top             =   0
      Visible         =   0   'False
      Width           =   255
   End
End
Attribute VB_Name = "试题显示"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Data1.Recordset.FindFirst ("daanlujing ='" & Label3.Caption & "'")
If Data1.Recordset.NoMatch Then
inta = MsgBox("没有该答案文件", vbYesNo, "温馨提示")
Else
试题显示.Hide
显示答案.Show
End If
Data2.DatabaseName = "试题库.mdb"
Data2.RecordSource = "历史记录"
Data2.Refresh
Data2.Recordset.AddNew
Data2.Recordset.Fields("用户名") = 登陆.Text4.Text
Data2.Recordset.Fields("操作日期") = Format(Date, "yy-mm-dd")
Data2.Recordset.Fields("操作时间") = Time
Data2.Recordset.Fields("所做题目") = Text1.Text
Data2.Recordset.Update
Unload Me
End Sub

Private Sub Command2_Click()
Data1.Recordset.FindFirst ("tinglilujing ='" & Label2.Caption & "'")
If Data1.Recordset.NoMatch Then
inta = MsgBox("没有该听力文件", vbYesNo, "温馨提示")
Else
WindowsMediaPlayer1.openPlayer App.Path & "\试题库\" & Label2.Caption
End If
End Sub

Private Sub Command3_Click()

查询.Show
试题显示.Hide

End Sub


Private Sub Form_Load()
Data1.DatabaseName = "试题库.mdb"
Data1.RecordSource = strSQL
Data1.Refresh
If Data1.Recordset.BOF And Data1.Recordset.EOF Then
 If inta = MsgBox("库中没有要查询的内容!", vbYesNo, "温馨提示") = vbYes Then
查询.Show
End If
Else
Label1.Caption = Data1.Recordset.Fields("shijuanlujing")
Label2.Caption = Data1.Recordset.Fields("tinglilujing")
Label3.Caption = Data1.Recordset.Fields("daanlujing")
Text1.Text = Data1.Recordset.Fields("shijuanmingcheng")
WebBrowser1.Navigate App.Path & "\试题库\" & Label1.Caption
End If
End Sub


⌨️ 快捷键说明

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