?? trana.frm
字號:
VERSION 5.00
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "comdlg32.ocx"
Begin VB.Form TranA
Caption = "A文件轉換程序"
ClientHeight = 1950
ClientLeft = 60
ClientTop = 345
ClientWidth = 4515
LinkTopic = "Form1"
ScaleHeight = 1950
ScaleWidth = 4515
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command2
Caption = "打開文件"
Height = 375
Left = 3000
TabIndex = 6
Top = 240
Width = 1215
End
Begin VB.TextBox Text3
Height = 375
Left = 1560
TabIndex = 4
Top = 720
Width = 2655
End
Begin VB.CommandButton Command1
Caption = "開始轉換"
Height = 375
Left = 3000
TabIndex = 3
Top = 1320
Width = 1215
End
Begin VB.TextBox Text2
Height = 375
Left = 240
TabIndex = 2
Top = 240
Width = 2655
End
Begin VB.TextBox Text1
Height = 375
Left = 1920
TabIndex = 1
Top = 1320
Width = 735
End
Begin MSComDlg.CommonDialog CmdOpen
Left = 2280
Top = 0
_ExtentX = 847
_ExtentY = 847
_Version = 393216
End
Begin VB.Label Label2
Caption = "轉換后文件名:"
Height = 255
Left = 240
TabIndex = 5
Top = 840
Width = 1215
End
Begin VB.Label Label1
Caption = "輸入所在月份日數:"
Height = 255
Left = 240
TabIndex = 0
Top = 1440
Width = 1575
End
End
Attribute VB_Name = "TranA"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
'PC 氣壓 TB 氣溫 EA 水汽壓 UB 相對濕度 IB 露點 R6 降水 L0 蒸發 S2 日照
Dim M, i, j As Integer
Dim Temp, StrE, StrA, StrB, StrC, StrD, StrH, OutFile As String
M = Val(Text1.Text)
OutFile = Text3.Text
ChDir App.Path
Open OutFile For Append As #2
Open Text2 For Input As #1
Do While Not EOF(1)
Line Input #1, StrE
If StrE = "PC" Or StrE = "TB" Or StrE = "EA" Or StrE = "UB" Then
Print #2, StrE
For i = 1 To M
Line Input #1, StrA
Line Input #1, StrB
StrH = StrA + " " + StrB
Print #2, StrH
Next i
End If
Loop
Close #1
Open Text2 For Input As #1
Do While Not EOF(1)
Line Input #1, StrE
If StrE = "IB" Then
Print #2, StrE
Line Input #1, Temp
For i = 1 To M
Line Input #1, StrA
Line Input #1, StrB
StrH = StrA + " " + StrB
Print #2, StrH
Next i
End If
Loop
Close #1
Open Text2 For Input As #1
Do While Not EOF(1)
Line Input #1, StrE
If StrE = "R6" Or StrE = "L0" Or StrE = "S2" Then
Print #2, StrE
For i = 1 To M
Line Input #1, StrA
Print #2, StrA
Next i
End If
Loop
Close #1
Open Text2 For Input As #1
Do While Not EOF(1)
Line Input #1, StrE
If StrE = "FN" Then
Print #2, StrE
For i = 1 To M
Line Input #1, StrA
Line Input #1, StrB
Line Input #1, StrC
Line Input #1, StrD
StrH = StrA + " " + StrB + " " + StrC + " " + StrD
Print #2, StrH
Next i
Exit Do
End If
Loop
Close #1
Close #2
End Sub
Private Sub Command2_Click()
CmdOpen.Filter = "TEXT (*.txt)|*.txt"
CmdOpen.ShowOpen
Text2 = CmdOpen.FileName
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -