practice10-42.frm
来自「深圳大学的vb上机与教学的课件」· FRM 代码 · 共 109 行
FRM
109 行
VERSION 5.00
Begin VB.Form Form2
BorderStyle = 1 'Fixed Single
Caption = "Form2"
ClientHeight = 2385
ClientLeft = 45
ClientTop = 330
ClientWidth = 4680
ControlBox = 0 'False
LinkTopic = "Form2"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 2385
ScaleWidth = 4680
StartUpPosition = 2 '屏幕中心
Begin VB.CommandButton Command3
Caption = "取消"
Height = 495
Left = 3120
TabIndex = 7
Top = 1680
Width = 1095
End
Begin VB.CommandButton Command2
Caption = "缺省值"
Height = 495
Left = 3120
TabIndex = 6
Top = 960
Width = 1095
End
Begin VB.CommandButton Command1
Caption = "确定"
Height = 495
Left = 3120
TabIndex = 5
Top = 240
Width = 1095
End
Begin VB.Frame Frame1
Caption = "请输入整数"
Height = 2055
Left = 240
TabIndex = 0
Top = 120
Width = 2535
Begin VB.TextBox Text2
Height = 495
Left = 960
TabIndex = 4
Top = 1200
Width = 1335
End
Begin VB.TextBox Text1
Height = 495
Left = 960
TabIndex = 2
Top = 480
Width = 1335
End
Begin VB.Label Label2
AutoSize = -1 'True
Caption = "最小值:"
Height = 180
Left = 240
TabIndex = 3
Top = 1440
Width = 720
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "最大值:"
Height = 180
Left = 240
TabIndex = 1
Top = 720
Width = 720
End
End
End
Attribute VB_Name = "Form2"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
b = Val(Text1.Text)
a = Val(Text2.Text)
Unload Me
End Sub
Private Sub Command2_Click()
b = 100
a = 0
Unload Me
End Sub
Private Sub Command3_Click()
Unload Me
End Sub
Private Sub Form_Unload(Cancel As Integer)
Form1.VScroll1.Max = b
Form1.VScroll1.Min = a
Form1.Label1.Caption = b
Form1.Label2 = a
Form1.Text1.Text = ""
End Sub
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?