practice6_5.frm
来自「深圳大学的vb上机与教学的课件」· FRM 代码 · 共 95 行
FRM
95 行
VERSION 5.00
Begin VB.Form Form1
Caption = "求1x3x5x7x......x(2n-1)的值"
ClientHeight = 1710
ClientLeft = 60
ClientTop = 345
ClientWidth = 3840
LinkTopic = "Form1"
ScaleHeight = 1710
ScaleWidth = 3840
StartUpPosition = 2 '屏幕中心
Begin VB.CommandButton Command1
Caption = "求值"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 240
TabIndex = 2
Top = 960
Width = 975
End
Begin VB.TextBox Text1
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 1440
TabIndex = 1
Top = 240
Width = 2055
End
Begin VB.Label Label2
BorderStyle = 1 'Fixed Single
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 1440
TabIndex = 3
Top = 960
Width = 2055
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "请输入n:"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 210
Left = 360
TabIndex = 0
Top = 360
Width = 945
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()
n = Val(Text1.Text)
f = 1
For i = 1 To n
f = f * (2 * i - 1)
Next i
Label2.Caption = f
End Sub
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?