form1.frm
来自「VB初级练习源码适合刚学习VB的人练习。。。。」· FRM 代码 · 共 42 行
FRM
42 行
VERSION 5.00
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 3090
ClientLeft = 60
ClientTop = 450
ClientWidth = 4680
LinkTopic = "Form1"
ScaleHeight = 3090
ScaleWidth = 4680
StartUpPosition = 3 '窗口缺省
Begin VB.TextBox Text1
Height = 1095
Left = 600
TabIndex = 0
Top = 240
Width = 3615
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Text1_Change()
Dim n As Integer, t As Double
t = 1
i = 1
top:
n = InputBox("输入值", 0, 0)
If n <= 0 Then
MsgBox "输入值错误", 0, "请输入正值"
GoTo top
Else
For i = 1 To n
t = t * i
Next
End If
Text1.Text = t
End Sub
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?