practice6_17.frm
来自「深圳大学的vb上机与教学的课件」· FRM 代码 · 共 62 行
FRM
62 行
VERSION 5.00
Begin VB.Form Form1
Caption = "用矩形法求定积分—单击窗体开始计算"
ClientHeight = 3195
ClientLeft = 60
ClientTop = 345
ClientWidth = 4680
LinkTopic = "Form1"
ScaleHeight = 3195
ScaleWidth = 4680
StartUpPosition = 2 '屏幕中心
Begin VB.Label Label1
BorderStyle = 1 'Fixed Single
BeginProperty Font
Name = "宋体"
Size = 15
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 2160
TabIndex = 1
Top = 1200
Width = 2295
End
Begin VB.OLE OLE1
BackStyle = 0 'Transparent
BorderStyle = 0 'None
Class = "Equation.3"
Height = 885
Left = 240
OleObjectBlob = "practice6_17.frx":0000
SizeMode = 1 'Stretch
TabIndex = 0
Top = 960
Width = 1800
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Form_Click()
N = Val(InputBox("请指定等分区间数", "", "50"))
H = 8 / N
X = -4
Area = 0
F1 = 1 / (1 + X ^ 2)
For I = 1 To N
Area1 = F1 * X
Area = Area + Area1
X = X + H
F1 = 1 / (1 + X ^ 2)
Next I
Label1.Caption = Format(Area, "0.000000")
End Sub
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?