?? form1.frm
字號:
VERSION 5.00
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "Msflxgrd.ocx"
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "Comdlg32.ocx"
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 5475
ClientLeft = 60
ClientTop = 345
ClientWidth = 11400
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 5475
ScaleWidth = 11400
StartUpPosition = 2 'CenterScreen
Begin VB.CommandButton Command5
Caption = "數據文件輸入"
Height = 495
Left = 10560
TabIndex = 21
Top = 3480
Width = 735
End
Begin VB.TextBox Text6
Height = 270
Left = 9240
TabIndex = 20
Text = "1"
Top = 1800
Width = 735
End
Begin VB.CommandButton Command3
Caption = "確定"
Height = 375
Left = 10560
TabIndex = 18
Top = 2520
Width = 735
End
Begin VB.TextBox Text5
Height = 270
Left = 6600
TabIndex = 12
Text = "0"
Top = 1800
Width = 975
End
Begin VB.TextBox Text4
Height = 270
Left = 3960
TabIndex = 11
Text = "101325"
Top = 1800
Width = 1215
End
Begin VB.TextBox Text3
Height = 270
Left = 1920
TabIndex = 10
Text = "9"
Top = 1800
Width = 855
End
Begin VB.TextBox Text2
Height = 270
Left = 4320
TabIndex = 8
Text = "C9-19"
Top = 240
Width = 1215
End
Begin VB.CommandButton Command4
Caption = "輸出"
Height = 405
Left = 10560
TabIndex = 6
Top = 4440
Width = 735
End
Begin MSComDlg.CommonDialog CommonDialog1
Left = 9000
Top = 4920
_ExtentX = 847
_ExtentY = 847
_Version = 393216
End
Begin MSFlexGridLib.MSFlexGrid GGrid3
Height = 2745
Left = 150
TabIndex = 5
Top = 2280
Width = 10020
_ExtentX = 17674
_ExtentY = 4842
_Version = 393216
Rows = 10
Cols = 6
TextStyle = 4
ScrollBars = 2
End
Begin MSFlexGridLib.MSFlexGrid GGrid1
Height = 930
Left = 150
TabIndex = 4
Top = 645
Width = 10155
_ExtentX = 17912
_ExtentY = 1640
_Version = 393216
Rows = 3
Cols = 10
ScrollBars = 0
End
Begin VB.CommandButton Command2
Caption = "確定"
Height = 375
Left = 10560
TabIndex = 3
Top = 1800
Width = 735
End
Begin VB.CommandButton Command1
Caption = "確定"
Height = 375
Left = 10560
TabIndex = 2
Top = 960
Width = 735
End
Begin VB.TextBox Text1
Height = 270
Left = 1680
TabIndex = 1
Text = "Gu-10"
Top = 240
Width = 1095
End
Begin VB.Label Label9
Caption = "設計點序號"
Height = 255
Left = 8040
TabIndex = 19
Top = 1800
Width = 975
End
Begin VB.Label Label8
Caption = "C"
BeginProperty Font
Name = "宋體"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 7800
TabIndex = 17
Top = 1800
Width = 255
End
Begin VB.Label Label7
Caption = "0"
Height = 255
Left = 7680
TabIndex = 16
Top = 1800
Width = 135
End
Begin VB.Label Label6
Caption = "Pa"
Height = 270
Left = 5280
TabIndex = 15
Top = 1800
Width = 255
End
Begin VB.Label Label5
Caption = "溫度"
Height = 270
Left = 5880
TabIndex = 14
Top = 1800
Width = 495
End
Begin VB.Label Label3
Caption = "大氣壓力"
Height = 255
Left = 3000
TabIndex = 13
Top = 1800
Width = 855
End
Begin VB.Label Label2
Caption = "輸入性能曲線點數"
Height = 255
Left = 360
TabIndex = 9
Top = 1800
Width = 1575
End
Begin VB.Label Label4
Caption = "型號"
Height = 270
Left = 3240
TabIndex = 7
Top = 240
Width = 735
End
Begin VB.Label Label1
Caption = "模型編號"
Height = 270
Left = 240
TabIndex = 0
Top = 240
Width = 735
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim i As Integer
Dim Np As Single, Ns As Single, b2 As Single, beta2 As Single, D2 As Single, D1 As Single, U2 As Single, Zi As Single, Zshort As Single '定義模型尺寸
Dim Pin As Single, tin As Single
Dim N As Integer 'N為工況點的個數
Dim Codenum As Integer
Dim Faim() As Single '各個工況點的流量系數
Dim Pstot() As Single '各個工況點的全壓系數
Dim Eftot() As Single '各個工況點的全壓效率
Dim Psst() As Single '各個工況點的靜壓系數
Dim Efst() As Single '各個工況點的靜壓效率
Dim Anoise() As Single '各個工況點的噪聲,單位:分貝
Dim ssout, QQx(), Ptot(), Pst() As Single 'ssout:蝸殼出口面積, QQx() 流量, Ptot()全壓升, Pst()靜壓升
Dim Last1(1 To 9)
Dim Last2() As Single
Dim Last3() As Single
Private Sub Form_Load() '****************網格初始化
Dim strR1 As String, strR2 As String, strR3 As String, strR4 As String, strR5 As String, strR6 As String, str As String, Temp As Variant
Dim strC1 As String, strC2 As String, strC3 As String, strC4 As String, strC5 As String, strC6 As String, strC7 As String
Dim strA1 As String, strA2 As String, strA3 As String, strA4 As String, strA5 As String, strA6 As String, strA7 As String
Dim count As Integer
Dim rr As Integer, Temp1 As String
GGrid1.Row = 2
GGrid1.Col = 1
GGrid3.Cols = 7
GGrid3.ScrollBars = flexScrollBarVertical
strR1 = "|^壓力|^比轉數|^出口寬度|^出口角度|^葉輪外徑|^葉輪進口直徑|^圓周速度|^長葉片數|^短葉片數"
strC1 = ";模型參數|單位"
strA1 = strR1 & strC1
strR2 = "|^N|^Φd|^Ψtot.d|^ηtot.d|^Ψst.d|^ηst.d|^Anoised|"
strC2 = ";設計點參數"
strA2 = strR2 & strC2
strR3 = "|^流量(m3/s)|^全壓升(Pa)|^全壓效率|^靜壓升(Pa)|^靜壓效率|^噪聲(db)"
strC3 = ";工況點數|1|2|3|4|5|6|7|8|9|"
strA3 = strR3 & strC3
GGrid1.FormatString = strA1
GGrid3.FormatString = strA3
GGrid1.TextMatrix(1, 1) = "Np"
GGrid1.TextMatrix(1, 2) = "Ns"
GGrid1.TextMatrix(1, 3) = "b2(mm)"
GGrid1.TextMatrix(1, 4) = "β2"
GGrid1.TextMatrix(1, 5) = "D2(mm)"
GGrid1.TextMatrix(1, 6) = "D1(mm)"
GGrid1.TextMatrix(1, 7) = "U2(m/s)"
GGrid1.TextMatrix(1, 8) = "Zi"
GGrid1.TextMatrix(1, 9) = "Zshort"
For i = 5 To GGrid1.Cols - 1
GGrid1.ColWidth(i) = 1300
Next i
For i = 0 To GGrid3.Cols - 1
GGrid3.ColWidth(i) = 1000
Next i
GGrid1.RowHeight(0) = 400
'*******************************************************************'讀入上次輸入結果
Open App.Path & "\" & "Lastest.dat" For Input As #1
Do While Not EOF(1)
Line Input #1, media
If Val(media) = 0 Then
Else
count = count + 1
End If
Loop
count = count - 1
Close #1
Open App.Path & "\" & "Lastest.dat" For Input As #1
Input #1, Last1(1), Last1(2), Last1(3), Last1(4), Last1(5), Last1(6), Last1(7), Last1(8), Last1(9), rr
Line Input #1, Temp1
If count >= 1 Then
Text3.Text = count
Text6.Text = rr
GGrid3.Rows = count + 1
ReDim Last2(1 To count, 1 To 7)
For i = 1 To count
For j = 1 To 7
Input #1, Last2(i, j)
Next j
Next i
Else
Text3.Text = 9
End If
Close #1
For i = 1 To 9
GGrid1.TextMatrix(2, i) = Last1(i)
Next i
If count >= 1 Then
For i = 1 To count
For j = 1 To 6
GGrid3.TextMatrix(i, j) = Last2(i, j)
If GGrid3.TextMatrix(i, j) = 0 Then
GGrid3.TextMatrix(i, j) = ""
End If
Next j
Next i
End If
'*********************************************************************
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -