Results 1 to 7 of 7

Thread: [Resolved] Multiline File into a single line string.

Threaded View

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Sep 2005
    Posts
    540

    [Resolved] Multiline File into a single line string.

    This problem always keep comming up. When reading from a file that has multiple lines during debug (though i only need the first line), the program works fine. But when compiled and trying to read from it, the it somtimes reads the first line as null and i have to make code that will read the second line. In notepad it says it's the first line.

    VB Code:
    1. Open Filename For Input As #1
    2. Line Input #1, File_Contents
    3. Close #1

    ^^^^^ Code used.


    Any way, what i want to know is how to load the entire file contents into a string. No matter how many lines or what ever else.

    If i had this stored in a file:

    QWERTY
    ASDFGH
    ZXCVBN

    and loaded it, i want it to look like this in a string "QWERTYASDFGHZXCVBN"

    Can anyone help me out?
    Last edited by Slyke; Jan 23rd, 2007 at 10:13 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width