do until eof(1)
line input #1, buf
loop
一次读一行

解决方案 »

  1.   

    你每次读的时候,判断asc(node...)是不是等于13(回车),或者10(换行),如果是的话,就跳到下一个字符串。
    方便!
      

  2.   

    问题是用line Input或input时,我的本意是把<node>...</node>之间的东西都读到nodeDetail变量里,但由于Node(j).Detail 中的文本含有回车换行符,所以就只能读到这儿,之后的到</node>的内容就不能读了。
      

  3.   

    do until eof(1)
    line input #1, buf
    loop
      

  4.   

    Private Sub Command1_Click()
        Dim str As String
        
        str = Text1.Text
        Open "E:\当前工作\Node\test.con" For Binary Access Write As #1
        Print #1, str
        Close #1
        
    End SubPrivate Sub Command2_Click()
        Dim str As String
        
        str = Text1.Text
        Open "E:\当前工作\Node\test.con" For Binary Access Read As #1
        Input #1, str
        Close #1
        
        Text1.Text = str
    End Sub我想换成二进制方式的读写,以上代码不能工作,怎么办呢?
      

  5.   

    二进制就不是这样了写用Put
    读取用Get例子:dim aaa() as byteopen ...
    redim aaa(1 to lof(1))
    get #1, 1, aaa写:put #1,,aaa()