practice6_15.frm
来自「深圳大学的vb上机与教学的课件」· FRM 代码 · 共 109 行
FRM
109 行
VERSION 5.00
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 3480
ClientLeft = 60
ClientTop = 345
ClientWidth = 5595
LinkTopic = "Form1"
ScaleHeight = 3480
ScaleWidth = 5595
StartUpPosition = 2 '屏幕中心
Begin VB.TextBox Text3
Height = 495
Left = 2880
TabIndex = 6
Top = 2520
Width = 2175
End
Begin VB.TextBox Text2
Height = 375
Left = 2880
TabIndex = 5
Top = 1920
Width = 2175
End
Begin VB.CommandButton Command2
Caption = "直到最后一项小于10E-6"
Height = 495
Left = 480
TabIndex = 4
Top = 2520
Width = 2175
End
Begin VB.CommandButton Command1
Caption = "直到第20项"
Height = 495
Left = 1080
TabIndex = 3
Top = 1800
Width = 1575
End
Begin VB.TextBox Text1
Height = 375
Left = 2880
TabIndex = 2
Top = 1320
Width = 2175
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "请输入x:"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 285
Left = 1560
TabIndex = 1
Top = 1320
Width = 1020
End
Begin VB.OLE OLE1
BackStyle = 0 'Transparent
BorderStyle = 0 'None
Class = "Equation.3"
Height = 855
Left = 840
OleObjectBlob = "practice6_15.frx":0000
SizeMode = 1 'Stretch
TabIndex = 0
Top = 240
Width = 4215
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()
s = 1
t = 1
x = Val(Text1.Text)
For i = 1 To 20
t = t * x / i
s = s + t
Next i
Text2.Text = Format(s, "0.0000000000")
End Sub
Private Sub Command2_Click()
s = 1
t = 1
x = Val(Text1.Text)
i = 1
Do While t > 0.000001
t = t * x / i
s = s + t
i = i + 1
Loop
Text3.Text = Format(s, "0.0000000000")
End Sub
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?