📄 例11.frm
字号:
VERSION 5.00
Begin VB.Form FRM10_4_11
Caption = "例11:三角皮带传动"
ClientHeight = 3150
ClientLeft = 60
ClientTop = 450
ClientWidth = 5145
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
LinkTopic = "Form1"
ScaleHeight = 3150
ScaleWidth = 5145
StartUpPosition = 3 '窗口缺省
Begin VB.TextBox Text2
Height = 495
Left = 2640
TabIndex = 4
Top = 2040
Width = 2055
End
Begin VB.CommandButton Command2
Caption = "查找标准直径"
Height = 495
Left = 240
TabIndex = 3
Top = 2040
Width = 2175
End
Begin VB.TextBox Text1
Height = 495
Left = 2640
TabIndex = 2
Top = 1200
Width = 1935
End
Begin VB.CommandButton Command1
Caption = "建立数据文件"
Height = 495
Left = 1800
TabIndex = 0
Top = 360
Width = 2415
End
Begin VB.Label Label1
BorderStyle = 1 'Fixed Single
Caption = "输入大带轮的直径"
Height = 495
Left = 240
TabIndex = 1
Top = 1200
Width = 2175
End
End
Attribute VB_Name = "FRM10_4_11"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click() '建立数据文件
Open App.Path + "\WORDFILE\SanJiaoDai.Txt" For Output As #1
Write #1, 63, 67, 71, 75, 80, 90, 95, 100, 106, 112
Write #1, 118, 125, 132, 140, 150, 160, 170, 180, 200, 212
Write #1, 224, 236, 250, 265, 280, 300, 315, 355, 375, 400
Write #1, 425, 450, 475, 500, 530, 560, 600, 630, 670, 710
Write #1, 750, 800, 900, 1000, 1060, 1120, 1250, 1400, 1500
Write #1, 1600, 1800, 1900, 2000, 2240, 2500
Close
End Sub
Private Sub Command2_Click() '实现查找
Dim D2 As Single
Dim D2_BiaoZhun As Single
D2 = Val(Text1)
Open App.Path + "\WORDFILE\SanJiaoDai.Txt" For Input As #1
Input #1, D2_BiaoZhun
Do While Not EOF(1)
If D2 > D2_BiaoZhun Then
Input #1, D2_BiaoZhun
Else
D2 = D2_BiaoZhun
Exit Do
End If
Loop
Close
Text2 = D2
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -