7,763
社区成员
发帖
与我相关
我的任务
分享
Private Sub Command1_Click()
Dim a As Integer
Dim b As Integer
Dim c As Integer
Dim i As Integer
Dim tx As String
Dim nm As String
i = 0
Com1.ShowOpen
Com1.DialogTitle = "打开文件"
Com1.Filter = "文本文件|*.txt|"
Open Com1.FileName For Binary As #1
a = LOF(1) / 4
tx = String$(a, " ")
Get #1, 1, tx
b = Seek(1)
Text1.Text = tx
nm = Left(Com1.FileName, Len(Com1.FileName) - 4)
Open nm & "5.txt" For Output As #2
Print #2, tx
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Command1_Click()
Dim a As Integer
Dim b As Integer
Dim c As Integer
Dim i As Integer
Dim tx As String
Dim txtmp() As String
Dim nm As String
Text1 = "": Text2 = "": Text3 = "": Text4 = "":
Com1.ShowOpen
Com1.DialogTitle = "打开文件"
Com1.Filter = "文本文件|*.txt|"
Open Com1.FileName For Binary As #1
tx = StrConv(InputB(LOF(1), 1), vbUnicode)
txtmp = Split(tx, vbCrLf)
a = UBound(txtmp) + 1
b = IIf(a Mod 4, Int(a / 4) + 1, a / 4)
Private Sub Command1_Click()
Dim a As Integer
Dim b As Integer
Dim c As Integer
Dim i As Integer
Dim tx As String
Dim nm As String
Com1.ShowOpen
Com1.DialogTitle = "打开文件"
Com1.Filter = "文本文件|*.txt|"
Open Com1.FileName For Binary As #1
tx = StrConv(InputB(LOF(1), 1), vbUnicode)
a = IIf(Len(tx) Mod 4, Int(Len(tx) / 4) + 1, Len(tx) / 4)
For b = 1 To 4
Me("Text" & b).Text = Mid(tx, a * (b - 1) + 1, a)
Next
Close #1
End Sub
Private Sub Command1_Click()
Dim a As Integer
Dim b As Integer
Dim c As Integer
Dim i As Integer
Dim tx() As Byte
Dim nm As String
Com1.ShowOpen
Com1.DialogTitle = "打开文件"
Com1.Filter = "文本文件|*.txt|"
Open Com1.FileName For Binary As #1
a = LOF(1) / 4 + 0.5
ReDim tx(a)
For b = 1 To 4
Get #1, Seek(1), tx
Me("Text" & b).Text = StrConv(tx, vbUnicode)
Next
Close #1
End Sub