📄 tikugli.frm
字号:
VERSION 5.00
Begin VB.Form tikugli
BackColor = &H8000000A&
Caption = " 题库管理"
ClientHeight = 6540
ClientLeft = 165
ClientTop = 450
ClientWidth = 8625
LinkTopic = "Form2"
ScaleHeight = 6540
ScaleWidth = 8625
StartUpPosition = 2 '屏幕中心
Begin VB.ComboBox Combo1
Height = 300
Left = 0
TabIndex = 8
Text = "Combo1"
Top = 3600
Visible = 0 'False
Width = 1215
End
Begin VB.ComboBox Combo2
Height = 300
Left = 0
TabIndex = 7
Text = "Combo2"
Top = 4800
Visible = 0 'False
Width = 1215
End
Begin VB.Label Label7
BackStyle = 0 'Transparent
Caption = "知识点"
Height = 495
Left = 5400
TabIndex = 6
Top = 2160
Visible = 0 'False
Width = 495
End
Begin VB.Label Label6
BackStyle = 0 'Transparent
Caption = "难度"
Height = 375
Left = 1920
TabIndex = 5
Top = 2160
Visible = 0 'False
Width = 495
End
Begin VB.Label Label5
BackStyle = 0 'Transparent
Caption = "分值"
Height = 495
Left = 5280
TabIndex = 4
Top = 720
Visible = 0 'False
Width = 735
End
Begin VB.Label Label4
BackStyle = 0 'Transparent
Caption = "题号"
Height = 375
Left = 2040
TabIndex = 3
Top = 720
Visible = 0 'False
Width = 495
End
Begin VB.Label Label3
BackStyle = 0 'Transparent
Caption = "题目区"
Height = 615
Left = 2040
TabIndex = 2
Top = 3480
Visible = 0 'False
Width = 735
End
Begin VB.Label Label2
BackStyle = 0 'Transparent
Caption = "请选择题型"
Height = 255
Left = 0
TabIndex = 1
Top = 4440
Visible = 0 'False
Width = 975
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = " 请选择科目"
Height = 375
Left = 0
TabIndex = 0
Top = 3120
Visible = 0 'False
Width = 1095
End
Begin VB.Image Image1
Height = 2850
Left = 0
Picture = "tikugli.frx":0000
Top = 120
Width = 2145
End
Begin VB.Menu file
Caption = "文件"
Begin VB.Menu new
Caption = "新建"
Begin VB.Menu shujuku
Caption = "数据库"
Index = 0
End
Begin VB.Menu shujubiao
Caption = "数据表"
Index = 0
End
End
End
Begin VB.Menu xinxi
Caption = "信息"
Begin VB.Menu liulan
Caption = "浏览"
End
Begin VB.Menu update
Caption = "更新"
End
Begin VB.Menu add
Caption = "添加"
End
Begin VB.Menu delete
Caption = "删除"
End
Begin VB.Menu modify
Caption = "修改"
End
End
Begin VB.Menu h
Caption = "帮助"
Begin VB.Menu help
Caption = "help"
Shortcut = {F1}
End
End
End
Attribute VB_Name = "tikugli"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub add_Click()
For i = 0 To 4
DataGrid1(i).Visible = False
Text1(i).Visible = False
Text2(i).Visible = True
Text2(i).Text = " "
Next i
Label1.Visible = True
Label2.Visible = True
Label3.Visible = True
Label4.Visible = True
Label5.Visible = True
Label6.Visible = True
Label7.Visible = True
Combo1.Visible = True
Combo2.Visible = True
End Sub
Private Sub Combo2_Click()
i = Combo2.ListIndex
Text1(i).ZOrder
DataGrid1(i).ZOrder
End Sub
Private Sub delete_Click()
Dim r As Integer
r = MsgBox("确定删除当前记录?", vbExclamation + vbYesNo)
If r = vbYes Then
i = Combo2.ListIndex
Adodc1(i).Recordset.delete
Adodc1(i).Recordset.MoveNext
If Adodc1(i).Recordset.EOF Then
Adodc1(i).Recordset.MoveLast
End If
End If
End Sub
Private Sub Form_Load()
For i = 0 To 4
Adodc1(i).ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + App.Path + "\shujuku.mdb;"
Next
Adodc1(0).RecordSource = "选择题"
Adodc1(1).RecordSource = "完型填空"
Adodc1(2).RecordSource = "书面表达"
Adodc1(3).RecordSource = "短文改错"
Adodc1(4).RecordSource = "阅读理解"
For j = 0 To 4
Set Text1(j).DataSource = Adodc1(j)
Text1(j).DataField = "题目"
Set DataGrid1(j).DataSource = Adodc1(j)
Next
Combo1.Clear
Combo1.AddItem "英语"
Combo1.AddItem "数学"
Combo1.Text = "科目"
End Sub
Private Sub Combo1_Click()
Select Case Combo1.Text
Case "英语"
Combo2.Clear
Combo2.AddItem "选择题"
Combo2.AddItem "完型填空"
Combo2.AddItem "书面表达"
Combo2.AddItem "短文改错"
Combo2.AddItem "阅读理解"
Combo2.Text = "题型"
Case "数学"
Combo2.Clear
Combo2.AddItem "选择题"
Combo2.AddItem "填空"
Combo2.AddItem "解答题"
Combo2.Text = "题型"
End Select
End Sub
Private Sub help_Click()
Load help
End Sub
Private Sub liulan_Click()
Label1.Visible = True
Label2.Visible = True
Label3.Visible = True
Label4.Visible = False
Label5Visible = False
Label6Visible = False
Label7.Visible = False
For i = 0 To 4
DataGrid1(i).Visible = True
Text1(i).Visible = True
Combo1.Visible = True
Combo2.Visible = True
Text2(i).Visible = False
Next i
Label3.Visible = True
End Sub
Private Sub update_Click()
i = Combo2.ListIndex
Adodc1(i).Recordset.AddNew
Adodc1(i).Recordset("题号") = CInt(Text2(0).Text)
If i = 0 Or i = 4 Then
Adodc1(i).Recordset("知识点") = (Text2(3).Text)
End If
Adodc1(i).Recordset("分值") = CInt(Text2(1).Text)
Adodc1(i).Recordset("难度") = Text2(2).Text
Adodc1(i).Recordset("题目") = Text2(4).Text
Label1.Visible = True
Label2.Visible = True
Label3.Visible = True
Label4.Visible = False
Label5Visible = False
Label6Visible = False
Label7.Visible = False
For i = 0 To 4
DataGrid1(i).Visible = True
Text1(i).Visible = True
Combo1.Visible = True
Combo2.Visible = True
Text2(i).Visible = False
Next i
Label3.Visible = True
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -