📄 form4.frm
字号:
VERSION 5.00
Begin VB.Form Form4
Caption = "Form4"
ClientHeight = 3090
ClientLeft = 60
ClientTop = 450
ClientWidth = 4680
LinkTopic = "Form4"
ScaleHeight = 3090
ScaleWidth = 4680
StartUpPosition = 3 '窗口缺省
WindowState = 2 'Maximized
Begin VB.CommandButton Command1
Caption = "生成均匀分布U[a,b]随机数"
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 855
Left = 3600
TabIndex = 4
Top = 2520
Width = 3855
End
Begin VB.TextBox Text1
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 615
Left = 3360
TabIndex = 1
Top = 1560
Width = 1575
End
Begin VB.TextBox Text2
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 615
Left = 6720
TabIndex = 2
Top = 1560
Width = 1575
End
Begin VB.TextBox Text3
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 975
Left = 3600
MultiLine = -1 'True
ScrollBars = 1 'Horizontal
TabIndex = 3
Top = 3840
Width = 5655
End
Begin VB.CommandButton Command2
Caption = "返回"
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 615
Left = 5400
TabIndex = 0
Top = 5160
Width = 1215
End
Begin VB.Label Label1
Caption = "a:"
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 2160
TabIndex = 7
Top = 1560
Width = 1215
End
Begin VB.Label Label2
Caption = "b:"
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 615
Left = 5640
TabIndex = 6
Top = 1560
Width = 975
End
Begin VB.Label Label3
Caption = "随机数:"
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 615
Left = 2280
TabIndex = 5
Top = 3960
Width = 1335
End
End
Attribute VB_Name = "Form4"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Dim x, y As Single
a = Val(Text1.Text)
c = Val(Text2.Text)
For I = 2 To m
y = B(I)
If a >= c Then MsgBox "输入错误,要求a<b", , "提示信息": Text1.SetFocus: Text2.SetFocus: Exit Sub
x = (c - a) * y + a
Text3.Text = Text3.Text & Format(Str(x), "0.0000") & ","
Next I
End Sub
Private Sub Command2_Click()
Me.Hide
Form2.Show
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -