自动读入文件

自动读入文件_第1张图片

 

Public Class Form1
    Dim constIntLength As Integer = 9
    Dim varStringReadContent As String = ""

    Private Sub oneRead_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles oneRead.TextChanged
        If oneRead.Text.ToString <> "" Then
            If oneRead.Text.ToString.Length <> constIntLength Then
                MsgBox("读入长度不正确")
            Else
                varStringReadContent = oneRead.Text.ToString & "@" & varStringReadContent
                totalRead.Text = Replace(varStringReadContent, "@", vbCrLf)
                oneRead.Clear()
            End If
        End If
    End Sub
End Class

 

你可能感兴趣的:(自动读入文件)