📄 form1.frm
字号:
VERSION 5.00
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 2970
ClientLeft = 60
ClientTop = 450
ClientWidth = 8625
LinkTopic = "Form1"
ScaleHeight = 2970
ScaleWidth = 8625
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command1
Caption = "平均分"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 615
Left = 5640
TabIndex = 12
Top = 240
Width = 975
End
Begin VB.CommandButton Command3
Caption = "清空"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 3000
TabIndex = 11
Top = 1800
Width = 1095
End
Begin VB.TextBox Text6
Height = 495
Left = 6960
TabIndex = 6
Text = "Text6"
Top = 960
Width = 975
End
Begin VB.TextBox Text5
Height = 495
Left = 5640
TabIndex = 5
Text = "Text5"
Top = 960
Width = 975
End
Begin VB.CommandButton Command2
Caption = "总分"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 615
Left = 6960
TabIndex = 4
Top = 240
Width = 855
End
Begin VB.TextBox Text4
Height = 495
Left = 4320
TabIndex = 3
Text = "Text4"
Top = 960
Width = 975
End
Begin VB.TextBox Text3
Height = 495
Left = 3120
TabIndex = 2
Text = "Text3"
Top = 960
Width = 975
End
Begin VB.TextBox Text2
Height = 495
Left = 1800
TabIndex = 1
Text = "Text2"
Top = 960
Width = 975
End
Begin VB.TextBox Text1
Height = 495
Left = 480
TabIndex = 0
Text = "Text1"
Top = 960
Width = 975
End
Begin VB.Label Label4
Caption = "vb程序"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 4440
TabIndex = 10
Top = 360
Width = 975
End
Begin VB.Label Label3
Caption = "英语"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 3240
TabIndex = 9
Top = 360
Width = 975
End
Begin VB.Label Label2
Caption = "数学"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 1920
TabIndex = 8
Top = 360
Width = 975
End
Begin VB.Label Label1
Caption = "学号"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 600
TabIndex = 7
Top = 360
Width = 975
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim i As Integer, s As Integer, a(1 To 6) As Integer
Private Sub Command1_Click()
Call program
a(5) = s / 3
Text5.Text = a(5)
'Print
Print Space(10); a(5)
End Sub
Private Sub command2_click()
Call program
a(6) = s
Text6.Text = a(6)
'Print
'Print
Print Space(10); a(6)
End Sub
Sub program()
a(1) = Text1.Text
a(2) = Text2.Text
a(3) = Text3.Text
a(4) = Text4.Text
s = 0
ss = 0
For i = 2 To 4
s = s + a(i)
Next i
End Sub
Private Sub Command3_Click()
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
End Sub
Private Sub Form_Load()
Print
Print
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -