📄 lclist2valv3.frm
字号:
VERSION 5.00
Begin VB.Form lclst2valv3
Appearance = 0 'Flat
AutoRedraw = -1 'True
BackColor = &H00FFFFFF&
Caption = " LC87-LST2VAL"
ClientHeight = 3930
ClientLeft = 6720
ClientTop = 1440
ClientWidth = 6000
DrawStyle = 6 'Inside Solid
ForeColor = &H00000000&
Icon = "lclist2valv3.frx":0000
LinkTopic = "csXS"
PaletteMode = 1 'UseZOrder
ScaleHeight = 3930
ScaleWidth = 6000
Begin VB.TextBox filelisttxt
Height = 270
Left = 0
TabIndex = 11
Top = 3240
Width = 6135
End
Begin VB.CommandButton lst2val
BackColor = &H0000FF00&
Caption = "lst2val"
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 360
MaskColor = &H0000FF00&
TabIndex = 7
Top = 120
Width = 1335
End
Begin VB.Timer Timer1
Interval = 10
Left = 1320
Top = 0
End
Begin VB.DirListBox fdir
Height = 2610
Left = 0
TabIndex = 6
Top = 720
Width = 3615
End
Begin VB.DriveListBox fDrive
Height = 300
Left = 0
TabIndex = 5
Top = 480
Width = 3615
End
Begin VB.FileListBox Flist
Height = 2610
Left = 3600
Pattern = "*.lst"
TabIndex = 4
Top = 480
Width = 2415
End
Begin VB.TextBox outText
Height = 2145
Left = 480
MultiLine = -1 'True
ScrollBars = 2 'Vertical
TabIndex = 2
Text = "lclist2valv3.frx":27A2
Top = 720
Width = 3135
End
Begin VB.CommandButton exit
Caption = "exit"
Height = 375
Left = 3840
TabIndex = 1
Top = 0
Width = 1215
End
Begin VB.Label Label3
Caption = "OutputFileName:"
Height = 255
Left = 3240
TabIndex = 10
Top = 3480
Width = 2775
End
Begin VB.Label OUTFILE
BackStyle = 0 'Transparent
Caption = "OUTFILE"
Height = 255
Left = 3240
TabIndex = 9
Top = 3720
Width = 2895
End
Begin VB.Label Label1
BackColor = &H00C0FFC0&
Caption = "InputFileName:"
Height = 255
Left = 0
TabIndex = 8
Top = 3480
Width = 3255
End
Begin VB.Label FNAME
BackStyle = 0 'Transparent
Caption = "FNAME"
Height = 255
Left = 0
TabIndex = 3
Top = 3720
Width = 3015
End
Begin VB.Label timelbl
BackColor = &H00FFC0FF&
BackStyle = 0 'Transparent
Caption = "12:12:12 am"
Height = 255
Left = 1920
TabIndex = 0
Top = 0
Width = 1215
End
End
Attribute VB_Name = "lclst2valv3"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim in1, lstfl, valfl, ln1, ln2, ln3 As String
Dim X, Y As String
Dim drvstr, pathstr, OUTFLSTR, flstr As String
Dim char20, char21, char22, charif, charelse, charendif, fin(1 To 1000) As String
Dim fout(1 To 10000) As String
Dim datstr, mainloop, strx(100), ln11(100) As String
Dim LOK, datold, I, J, K, L, n As Long
Dim PRINTDEF, str30, str300, str3000, kc, cx As String
Dim filelisttxtText, SFR(66666) As String
Private Sub GETOUTFILE()
OUTFLSTR = FNAME.Caption
dnum = InStr(OUTFLSTR, ".")
LNUM = Len(OUTFLSTR)
If dnum > 1 Then
OUTFLSTR = Left$(OUTFLSTR, dnum - 1) + "_A_C.Hxx"
End If
End Sub
Private Sub exit_Click()
End
End Sub
Private Sub filelisttxt_Change()
On Error GoTo exitsub
FdirPath = fdir.Path
FlistPath = Flist.Path
I = InStr(filelisttxt.Text, ":")
If I > 1 Then
drvstr = Left(filelisttxt.Text, I)
End If
I = InStr(filelisttxt.Text, ".")
If I = 0 And FlistPath <> Flist.Path And FdirPath <> fdir.Path Then
flstr = ""
FNAME.Caption = flstr
OUTFILE = ""
OUTFLSTR = ""
End If
pathstr = filelisttxt.Text
fDrive.Drive = drvstr
fdir.Path = pathstr
Flist.Path = pathstr
wtfile
Exit Sub
exitsub:
filelisttxt.Text = filelisttxtText
fdir.Path = FdirPath
Flist.Path = FlistPath
End Sub
Private Sub flist_Click()
flstr = Flist.FileName
FNAME.Caption = Flist.FileName
GETOUTFILE
OUTFILE = OUTFLSTR
wtfile
End Sub
Private Sub fdir_Change()
pathstr = fdir.Path
Flist.Path = fdir.Path
wtfile
End Sub
Private Sub fDrive_Change()
drvstr = fDrive.Drive
fdir.Path = fDrive.Drive
Flist.Path = fdir.Path
wtfile
End Sub
Private Sub wtfile()
Open "c:\lclst2val.txt" For Output As #2
Print #2, drvstr
Print #2, pathstr
Print #2, flstr
Close #2
filelisttxtText = pathstr
filelisttxt.Text = pathstr
End Sub
Private Sub Form_Load()
Timer1.Interval = 108
Timer1.Enabled = True
On Error GoTo NOFILE
Open "c:\LClst2val.txt" For Input As #1
Input #1, drvstr
Input #1, pathstr
Input #1, flstr
Close #1
GoTo flini
NOFILE:
drvstr = "c:\"
pathstr = "c:\"
flstr = ""
Close #1
wtfile
flini:
Flist.Path = pathstr
fdir.Path = pathstr
fDrive.Drive = drvstr
FNAME.Caption = flstr
GETOUTFILE
OUTFILE = OUTFLSTR
RXSTR = ""
wtfile
timelbl.Caption = ""
outText.Text = ""
End Sub
Private Sub Form_Unload(Cancel As Integer)
End
End Sub
Function str2val(ByVal a As String) As Long
alen = Len(a)
abak = a
str2val = 0
str2mul = 1
alx = 0
Do While alen > 0
ABC = Asc(Right(abak, 1))
If ABC = Asc("X") Or ABC = Asc("x") Then
Exit Do
End If
If alen > 1 Then
abak = Left(abak, alen - 1)
End If
alen = alen - 1
If (ABC < 58 And ABC > 47) Or (ABC < 71 And ABC > 64) Or (ABC < 103 And ABC > 96) Then
If (ABC < 58 And ABC > 47) Then
str2val = str2val + str2mul * (ABC - 48)
ElseIf (ABC < 80 And ABC > 64) Then
str2val = str2val + str2mul * (ABC - 55)
ElseIf (ABC < 112 And ABC > 96) Then
str2val = str2val + str2mul * (ABC - 95)
End If
str2mul = str2mul * 16
End If
Loop
End Function
Function str2dec(ByVal a As String) As Long
alen = Len(a)
abak = a
str2dec = 0
str2mul = 1
alx = 0
Do While alen > 0
ABC = Asc(Right(abak, 1))
If ABC = Asc("X") Or ABC = Asc("x") Then
Exit Do
End If
If alen > 1 Then
abak = Left(abak, alen - 1)
End If
alen = alen - 1
If (ABC < 58 And ABC > 47) Or (ABC < 71 And ABC > 64) Or (ABC < 103 And ABC > 96) Then
If (ABC < 58 And ABC > 47) Then
str2dec = str2dec + str2mul * (ABC - 48)
ElseIf (ABC < 80 And ABC > 64) Then
str2dec = str2dec + str2mul * (ABC - 55)
ElseIf (ABC < 112 And ABC > 96) Then
str2dec = str2dec + str2mul * (ABC - 95)
End If
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -