|
我有一 text file (free hand format),我要把它 read 进来 display 在 VB 的 application。我尝试用 Text Box, 把 property 的数值这样:
txtMyValue.MaxLength = 50000
txtMyValue.MultiLine = True
txtMyValue.ScollBars = Both
为了可以有 End of Line,我 insert 了 Enter 的 ASCII value [Char(13)],但是,仍然不行!请问如何解决?
Coding 是这样:
Private Sub cmdView_Click()
Dim vFullName As String
Dim vLine As String
vFullName = "C:\Test.Txt"
Open vFullName For Input As #1
Do While Not EOF(1)
Input #1, vLine
txtView.Text = txtView.Text & vLine & Chr(13)
txtView.Refresh
Loop
Close #1
End Sub |
|