📄 frmscale.frm
字号:
TabIndex = 11
Top = 810
Width = 900
End
Begin VB.Label Label2
Caption = "T/H"
Height = 255
Index = 0
Left = 2805
TabIndex = 9
Top = 315
Width = 870
End
Begin VB.Label Label1
Caption = "最大流量:"
Height = 345
Index = 0
Left = 225
TabIndex = 8
Top = 345
Width = 930
End
End
Begin VB.Frame Frame2
Caption = "秤架类型"
Height = 1425
Left = 195
TabIndex = 1
Top = 330
Width = 4380
Begin VB.TextBox Text4
Height = 330
Index = 1
Left = 3180
TabIndex = 38
Text = "10"
Top = 870
Width = 660
End
Begin VB.TextBox Text4
Height = 330
Index = 0
Left = 1050
TabIndex = 35
Text = "100"
Top = 870
Width = 645
End
Begin VB.OptionButton Option1
Caption = "ICS30"
Height = 390
Index = 3
Left = 3270
TabIndex = 5
Top = 330
Width = 825
End
Begin VB.OptionButton Option1
Caption = "ICS17B"
Height = 390
Index = 2
Left = 2160
TabIndex = 4
Top = 315
Width = 975
End
Begin VB.OptionButton Option1
Caption = "ICS17A"
Height = 390
Index = 1
Left = 1080
TabIndex = 3
Top = 315
Width = 975
End
Begin VB.OptionButton Option1
Caption = "ICS14"
Height = 390
Index = 0
Left = 195
TabIndex = 2
Top = 315
Value = -1 'True
Width = 780
End
Begin VB.Label Label6
Caption = "Kg"
Height = 255
Index = 1
Left = 3990
TabIndex = 39
Top = 915
Width = 330
End
Begin VB.Label Label5
Caption = "托棍自重:"
Height = 255
Index = 1
Left = 2175
TabIndex = 37
Top = 915
Width = 945
End
Begin VB.Label Label6
Caption = "Kg"
Height = 255
Index = 0
Left = 1785
TabIndex = 36
Top = 900
Width = 240
End
Begin VB.Label Label5
Caption = "秤架自重:"
Height = 255
Index = 0
Left = 120
TabIndex = 34
Top = 915
Width = 945
End
End
End
Begin VB.Label Label4
Caption = "张家港天力科技自动化有限公司 www.zjgtianli.com"
ForeColor = &H000000FF&
Height = 390
Left = 405
TabIndex = 28
Top = 6315
Width = 5190
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim Num As Integer
Dim Minnum As Single
Dim Q As Single '流量
Dim V As Single '速度
Dim L As Single '托棍间距
Dim S As Single '称重区域
Dim M As Single '每米重量
Dim G As Single '总重
Dim D As Single '单只重量
Dim n As Single '过载系数
Dim G1 As Single '秤架自重
Dim G2 As Single '托棍自重
Dim Sort As Integer
Private Sub Command1_Click(Index As Integer)
Q = Val(Text1(0).Text)
V = Val(Text1(1).Text)
L = Val(Text1(2).Text)
n = Val(Text2)
G1 = Val(Text4(0))
G2 = Val(Text4(1))
M = Format(Q * 1000 / (V * 3600), "##.00")
If (Sort = 4) Then
G = M * L * 4 + G1 + G2
D = (G * n) / 4
End If
If (Sort = 3) Then
G = (M * L * 4 + G1 + G2) / 2
D = (G * n) / 2
End If
If (Sort = 2) Then
G = (M * L * 2 + G1 + G2) / 2
D = (G * n) / 2
End If
If (Sort = 1) Then
G = M * L + G1 + G2
D = (G * n)
End If
Label3(0).Caption = Panduan(D)
Label3(1).Caption = Num
Label3(2).Caption = M
End Sub
Private Sub Form_Load()
Label4.Caption = "张家港天力科技自动化有限公司 www.zjgtianli.com"
Option1_Click (0)
End Sub
Private Sub Option1_Click(Index As Integer)
Select Case Index
Case 0
If Option1(0).Value Then
Sort = 4
Num = 4
Text1(3) = Text1(2) * 4
End If
Case 1
If Option1(1).Value Then
Sort = 3
Num = 2
Text1(3) = Text1(2) * 4
End If
Case 2
If Option1(2).Value Then
Sort = 2
Num = 2
Text1(3) = Text1(2) * 2
End If
Case 3
If Option1(3).Value Then
Sort = 1
Num = 1
Text1(3) = Text1(2) * 1
End If
End Select
Text3 = Num
End Sub
Function Panduan(gg As Single) As Long
If gg > 10 And gg <= 30 Then
Panduan = 30
End If
If gg > 30 And gg <= 50 Then
Panduan = 50
End If
If gg > 50 And gg <= 100 Then
Panduan = 100
End If
If gg > 100 And gg <= 200 Then
Panduan = 200
End If
If gg > 200 And gg <= 300 Then
Panduan = 300
End If
If gg > 300 And gg <= 500 Then
Panduan = 500
End If
If gg > 500 And gg <= 1000 Then
Panduan = 1000
End If
If gg > 1000 And gg <= 2000 Then
Panduan = 2000
End If
End Function
Private Sub Text1_Change(Index As Integer)
If Sort = 3 Then
Text1(3) = Val(Text1(2)) * 4
Else
Text1(3) = Val(Text1(2)) * Num
End If
End Sub
Private Sub Text1_KeyPress(Index As Integer, KeyAscii As Integer)
If Index <= 2 And KeyAscii = 13 Then
Text1(Index + 1).SetFocus
End If
If Index = 3 Then
Text2.SetFocus
End If
End Sub
Private Sub Text2_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text3.SetFocus
End If
End Sub
Private Sub Text3_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Command1(0).SetFocus
End If
End Sub
Private Sub Text4_KeyPress(Index As Integer, KeyAscii As Integer)
If Index < 1 And KeyAscii = 13 Then
Text4(Index + 1).SetFocus
End If
If Index = 1 Then
Text1(0).SetFocus
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -