7,785
社区成员




Dim buff() As Byte
ReDim buff(FileLen("C:\新建 文本文档.txt") - 1)
Open "C:\新建 文本文档.txt" For Binary As #1
Get #1, , buff
RichTextBox1.Text = buff()
Close #1
Imports System.IO
Public Class Form1
Public srd As StreamReader
Public istr As String
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
srd = My.Computer.FileSystem.OpenTextFileReader("c:\1.txt", System.Text.Encoding.Default)
RichTextBox1.Text = srd.ReadToEnd.ToString
End Sub
End Class