debug.frm
来自「VB源码,是初学者的福因.让你很快掌握VB编程」· FRM 代码 · 共 68 行
FRM
68 行
VERSION 5.00
Begin VB.Form form1
Caption = "Debug"
ClientHeight = 1185
ClientLeft = 60
ClientTop = 345
ClientWidth = 3045
LinkTopic = "Form1"
ScaleHeight = 1185
ScaleWidth = 3045
StartUpPosition = 3 '窗口缺省
Begin VB.TextBox Text2
Alignment = 1 'Right Justify
Height = 270
Left = 1800
TabIndex = 3
Top = 360
Width = 1095
End
Begin VB.CommandButton Command1
Caption = "求阶乘"
Height = 375
Left = 1080
TabIndex = 2
Top = 720
Width = 855
End
Begin VB.TextBox Text1
Alignment = 1 'Right Justify
Height = 270
Left = 120
TabIndex = 0
Top = 360
Width = 1095
End
Begin VB.Label Label2
Caption = "阶乘值"
Height = 255
Left = 2040
TabIndex = 4
Top = 120
Width = 615
End
Begin VB.Label Label1
Caption = "输入值"
Height = 255
Left = 480
TabIndex = 1
Top = 120
Width = 615
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()
Text2.Text = JieCheng(Text1.Text)
End Sub
Function JieCheng(ByVal x As Integer) As Long
If x = 1 Then
JieCheng = 1
Else
JieCheng = x * JieCheng(x - 1)
End If
End Function
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?