因子问题.frm
来自「算法教案」· FRM 代码 · 共 60 行
FRM
60 行
VERSION 5.00
Begin VB.Form Form1
Caption = "找因子"
ClientHeight = 4065
ClientLeft = 60
ClientTop = 450
ClientWidth = 4785
LinkTopic = "Form1"
ScaleHeight = 4065
ScaleWidth = 4785
StartUpPosition = 3 '窗口缺省
Begin VB.TextBox Text1
Height = 375
Left = 2400
TabIndex = 3
Top = 1200
Width = 1095
End
Begin VB.CommandButton Command1
Caption = "计算"
Height = 495
Left = 2760
TabIndex = 1
Top = 2760
Width = 975
End
Begin VB.ListBox List1
Height = 3120
Left = 240
TabIndex = 0
Top = 480
Width = 1695
End
Begin VB.Label Label2
Caption = "输入正整数:"
Height = 255
Left = 2400
TabIndex = 2
Top = 720
Width = 1575
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()
Dim i, n As Integer
List1.Clear
n = Val(Text1.Text)
For i = 1 To n
If n Mod i = 0 Then List1.AddItem (Str(i))
Next i
End Sub
Private Sub Form_Load()
End Sub
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?