📄 form1.frm
字号:
VERSION 5.00
Begin VB.Form Form1
Caption = "Psycho1.05"
ClientHeight = 7815
ClientLeft = 2820
ClientTop = 2790
ClientWidth = 9975
Icon = "Form1.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
ScaleHeight = 7815
ScaleWidth = 9975
Begin VB.CommandButton Command2
Caption = "Command2"
Height = 495
Left = 9960
TabIndex = 6
Top = 2040
Visible = 0 'False
Width = 735
End
Begin VB.CommandButton Command1
Caption = "B"
Height = 975
Index = 1
Left = 1920
TabIndex = 2
Top = 6240
Width = 1695
End
Begin VB.CommandButton Command1
Caption = "A"
Height = 975
Index = 0
Left = 1920
TabIndex = 1
Top = 4800
Width = 1695
End
Begin VB.TextBox Text1
DataField = "题目"
DataSource = "Data1"
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 2295
Left = 1800
Locked = -1 'True
MultiLine = -1 'True
TabIndex = 0
Text = "Form1.frx":0816
Top = 1560
Width = 6975
End
Begin VB.Data Data1
Caption = "Data1"
Connect = "Access"
DatabaseName = "D:\你适合从事管理工作吗?\data\管理工作.mdb"
DefaultCursorType= 0 '缺省游标
DefaultType = 2 '使用 ODBC
Exclusive = 0 'False
Height = 735
Left = 2520
Options = 0
ReadOnly = 0 'False
RecordsetType = 1 'Dynaset
RecordSource = "MYJOB"
Top = 360
Visible = 0 'False
Width = 4695
End
Begin VB.Label Label2
Caption = "Label2"
DataField = "B项"
DataSource = "Data1"
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 1215
Index = 1
Left = 4080
TabIndex = 5
Top = 6120
Width = 5175
End
Begin VB.Label Label2
Caption = "Label2"
DataField = "A项"
DataSource = "Data1"
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 1215
Index = 0
Left = 4080
TabIndex = 4
Top = 4680
Width = 5175
End
Begin VB.Label Label1
Caption = "Label1"
DataField = "题号"
DataSource = "Data1"
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 615
Left = 1200
TabIndex = 3
Top = 1560
Width = 615
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command2_Click()
'Print s1
Form2.Show
End Sub
Private Sub Form_Load()
Data1.DatabaseName = App.Path + "\data\管理工作.mdb"
'C:\Documents and Settings\赵光\桌面\你适合从事管理工作吗?\data\管理工作.mdb
End Sub
Private Sub Command1_Click(Index As Integer)
Dim defen '每题得分
th = Val(Data1.Recordset.Fields("题号"))
If Index = 0 Then
defen = Val(Data1.Recordset.Fields("选A得分"))
ElseIf Index = 1 Then
defen = Val(Data1.Recordset.Fields("选B得分"))
End If
s1 = s1 + defen
Data1.Recordset.MoveNext
If Data1.Recordset.EOF Then
j = MsgBox("测试完毕!", 64, "你适合从事管理工作吗?")
Data1.Recordset.MoveLast
Command2_Click
End If
If Data1.Recordset.BOF Then
MsgBox "第一条记录"
Data1.Recordset.MoveFirst
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -