?? frmhybridgas.frm
字號:
Begin VB.Label Label5
Caption = "分子量"
Height = 255
Left = 2520
TabIndex = 44
Top = 240
Width = 615
End
Begin VB.Label Label1
Caption = "氣體列表(請單擊選擇)"
Height = 255
Left = 3360
TabIndex = 43
Top = 240
Width = 1935
End
End
Begin VB.Frame Frame3
Caption = "是否含水蒸氣"
Height = 3975
Left = 120
TabIndex = 0
Top = 0
Width = 5655
Begin VB.Frame Frame5
Height = 975
Left = 120
TabIndex = 67
Top = 840
Width = 1695
Begin VB.OptionButton Option4
Caption = "Option4"
Height = 255
Left = 120
TabIndex = 69
Top = 600
Width = 255
End
Begin VB.OptionButton Option3
Caption = "Option3"
Height = 180
Left = 120
TabIndex = 68
Top = 240
Value = -1 'True
Width = 255
End
Begin VB.Label Label28
AutoSize = -1 'True
Caption = "絕對濕度:"
Height = 180
Left = 480
TabIndex = 71
Top = 600
Width = 810
End
Begin VB.Label Label27
AutoSize = -1 'True
Caption = "相對濕度:"
Height = 180
Left = 480
TabIndex = 70
Top = 240
Width = 810
End
End
Begin VB.Frame Frame4
Height = 615
Left = 120
TabIndex = 64
Top = 240
Width = 5295
Begin VB.OptionButton Option2
Caption = "濕混合氣(含水蒸氣)"
Height = 255
Left = 3120
TabIndex = 66
Top = 240
Value = -1 'True
Width = 1935
End
Begin VB.OptionButton Option1
Caption = "干混合氣(不含水蒸氣)"
Height = 180
Left = 240
TabIndex = 65
Top = 240
Width = 2295
End
End
Begin VB.TextBox Text4
Height = 375
Left = 2106
TabIndex = 10
Top = 960
Width = 988
End
Begin VB.CommandButton Command4
Caption = "確定"
Height = 315
Left = 1440
TabIndex = 9
Top = 3480
Width = 700
End
Begin VB.CommandButton Command2
Caption = "重輸"
Height = 315
Left = 3480
TabIndex = 8
Top = 3480
Width = 700
End
Begin VB.TextBox Text5
Height = 375
Left = 2106
TabIndex = 7
Top = 1440
Width = 988
End
Begin VB.TextBox Text8
Height = 375
Index = 0
Left = 2115
TabIndex = 6
Top = 3000
Width = 988
End
Begin VB.TextBox Text7
Height = 375
Index = 0
Left = 2085
TabIndex = 5
Top = 2025
Width = 988
End
Begin VB.TextBox Text7
Height = 375
Index = 1
Left = 3840
TabIndex = 4
Top = 2025
Width = 1095
End
Begin VB.TextBox Text7
Height = 375
Index = 2
Left = 2115
TabIndex = 3
Top = 2520
Width = 988
End
Begin VB.TextBox Text8
Height = 375
Index = 1
Left = 3840
TabIndex = 2
Top = 3000
Width = 1095
End
Begin VB.TextBox Text7
Height = 375
Index = 3
Left = 3840
TabIndex = 1
Top = 2535
Width = 1095
End
Begin VB.Label Label17
Caption = "(%)"
Height = 255
Left = 3240
TabIndex = 20
Top = 1080
Width = 375
End
Begin VB.Label Label18
Caption = "克水/千克干空氣"
Height = 255
Left = 3240
TabIndex = 19
Top = 1485
Width = 1455
End
Begin VB.Label Label19
Caption = "進口壓力:"
Height = 255
Left = 1080
TabIndex = 18
Top = 2160
Width = 720
End
Begin VB.Label Label20
Caption = "進口溫度"
Height = 255
Left = 1080
TabIndex = 17
Top = 3120
Width = 735
End
Begin VB.Label Label21
Caption = "Pa"
Height = 255
Left = 3240
TabIndex = 16
Top = 2115
Width = 360
End
Begin VB.Label Label22
Caption = "K"
Height = 255
Left = 3240
TabIndex = 15
Top = 3120
Width = 255
End
Begin VB.Label Label23
Caption = "MPa"
Height = 240
Left = 5040
TabIndex = 14
Top = 2160
Width = 345
End
Begin VB.Label Label24
Caption = "kgf/cm2"
Height = 240
Left = 3120
TabIndex = 13
Top = 2640
Width = 690
End
Begin VB.Label Label26
Caption = "C"
Height = 255
Left = 5040
TabIndex = 12
Top = 3120
Width = 255
End
Begin VB.Label Label25
Caption = "bar"
Height = 255
Left = 5040
TabIndex = 11
Top = 2640
Width = 255
End
End
End
Attribute VB_Name = "frmHybridGas"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim flag As Integer
Dim molweight() As Single
Dim Sumcontent As Single 'Sumcontent 混合氣體百分含量和
Dim Cp1(1 To 7) As Single
Dim test1(1 To 6) As String '保存TEXT1,TEXT(2),TEXT(3)
Dim test2(1 To 6) As String
Dim test3(1 To 6) As String
Dim flag1 As Boolean
Dim flag2 As Boolean
Private Sub Form_Load()
Dim total As Integer
Me.AutoRedraw = True
Me.Left = 0
Me.Top = 0
Me.Width = 6000
Me.Height = 9300
Call init
total = sum + 1
ReDim molweight(total - 1)
flag = 0
ta = Array(-16, -14, -12, -10, -8, -6, -4, -2, 0, 2, 4, 6, 8, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100, 104.81, 109.32, 113.32, 116.93, 120.23, 127.43, 133.54, 138.88, 143.62, 147.92, 151.85, 158.84, 164.96, 170.42, 175.36, 179.88)
pa = Array(175.5, 207, 243, 287, 334, 389.5, 452, 525, 610, 704, 812, 931, 1070, 1226, 1312, 1400, 1500, 1600, 1705, 1825, 1930, 2070, 2196, 2334, 2490, 2650, 2815, 2990, 3180, 3365, 3560, 3732, 4000, 4240, 4490, 4760, 5030, 5330, 5620, 5950, 6285, 6630, 7010, 7380, 7800, 8200, 8650, 9120, 9600, 10100, 10600, 11190, 11770, 12180, 15300, 19900, 25000, 31200, 38550, 47400, 57850, 70500, 84500, 101325, 120000, 140000, 160000, 180000, 200000, 25000, 300000, 350000, 400000, 450000, 500000, 600000, 700000, 800000, 900000, 1000000)
For I = 1 To total - 1
molweight(I - 1) = Wmi(I)
List1.AddItem items(I)
Next I
For I = 0 To 5
Text1(I) = ""
Text2(I) = ""
Text3(I) = ""
Next I
Text5.Text = ""
Text7(0).Text = ""
Text7(1).Text = ""
Text7(2).Text = ""
Text8(0).Text = ""
Option1.Value = True
Option2.Value = False
Text4.Enabled = False
Text5.Enabled = False
Option3.Enabled = False
Option4.Enabled = False
End Sub
Private Sub Command1_Click()
Dim hum_r As Single '相對濕度
Dim hum_a As Single '絕對濕度
Dim c_vol(1 To 6) As Single '體積百分比
Dim emi(1 To 6) As Single
Dim k As Single '絕熱指數
Dim RdRw As Single
Dim Rm_h As Single
For I = 1 To 6
c_vol(I) = 0
emi(I) = 0
test2(I) = Val(Text2(I - 1).Text)
Next I
hum_r = 0
hum_a = 0
Sumcontent = 0 'Sumcontent初始化
Wm_m = 0
Cp = 0
Text5.Enabled = True '**************************\
For I = 0 To 5 '檢查體積百分含量的填寫錯誤
If Text1(I).Text = "" And Text2(I).Text <> "" Then
MsgBox "輸入不對應", vbCritical, "錯誤"
Exit Sub
End If
If Text2(I).Text = "" And Text1(I).Text <> "" Then
MsgBox "請輸入" & Text1(I).Text & "體積含量", vbCritical, "錯誤"
Exit Sub
End If
Sumcontent = Sumcontent + Val(Text2(I).Text)
Next I
If Sumcontent > 100.5 Or Sumcontent < 99.5 Then '檢查含量
MsgBox "輸入總含量有誤,請重新輸入!", vbCritical, "錯誤"
'For I = 0 To 5
'Text1(I).Text = ""
'Text2(I).Text = ""
'Text3(I).Text = ""
'Next I
'flag = 0
Exit Sub
Else
End If
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -