📄 半方差计算.frm
字号:
VERSION 5.00
Begin VB.Form Form1
Caption = "`"
ClientHeight = 7905
ClientLeft = 60
ClientTop = 345
ClientWidth = 9900
LinkTopic = "Form1"
ScaleHeight = 7905
ScaleWidth = 9900
StartUpPosition = 3 '窗口缺省
Begin VB.TextBox Text4
Height = 735
Left = 5640
TabIndex = 4
Text = "10.0"
Top = 3960
Width = 2055
End
Begin VB.TextBox Text3
Height = 735
Left = 5640
TabIndex = 3
Text = "7.5"
Top = 2880
Width = 2055
End
Begin VB.TextBox Text2
Height = 735
Left = 5640
TabIndex = 2
Text = "2.5"
Top = 1800
Width = 2055
End
Begin VB.CommandButton Command1
Caption = "Command1"
Height = 1095
Left = 3960
TabIndex = 1
Top = 4920
Width = 1815
End
Begin VB.TextBox Text1
Height = 735
Left = 5640
TabIndex = 0
Top = 720
Width = 2055
End
Begin VB.Label Label4
Caption = "输入a"
Height = 495
Left = 4920
TabIndex = 8
Top = 4200
Width = 855
End
Begin VB.Label Label3
Caption = "输入c1"
Height = 495
Left = 4920
TabIndex = 7
Top = 3120
Width = 735
End
Begin VB.Label Label2
Caption = "输入c0"
Height = 375
Left = 4920
TabIndex = 6
Top = 1920
Width = 735
End
Begin VB.Label Label1
Caption = "输入h"
Height = 615
Left = 4920
TabIndex = 5
Top = 960
Width = 855
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Dim r As Single
Dim h As Single
Dim c0 As Single
Dim c1 As Single
Dim a As Single
h = Val(Text1.Text)
c0 = Val(Text2.Text)
c1 = Val(Text3.Text)
a = Val(Text4.Text)
r = c0 + c1 * ((3 * h) / (2 * a) - (h / a) ^ 2 / 2)
Print Format(r, "##.000")
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -