Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Need some help

Need some help

Scheduled Pinned Locked Moved Visual Basic
helpquestion
9 Posts 5 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    jhoga
    wrote on last edited by
    #1

    I'm in need of a quick answer to a problem. I am trying to parse a tab delimited file for the purpose of feed it to a check printer. I am using a stream reader and the issue is that the reader is dropping the first char of each line. Here's the code: Do While strRead.Read <> strRead.EndOfStream strTest = strRead.ReadLine strWrite = strTest.Replace("""", "") ListBox1.Items.Add(strWrite) Loop Can anybody help? Thanks:confused:

    J L T 3 Replies Last reply
    0
    • J jhoga

      I'm in need of a quick answer to a problem. I am trying to parse a tab delimited file for the purpose of feed it to a check printer. I am using a stream reader and the issue is that the reader is dropping the first char of each line. Here's the code: Do While strRead.Read <> strRead.EndOfStream strTest = strRead.ReadLine strWrite = strTest.Replace("""", "") ListBox1.Items.Add(strWrite) Loop Can anybody help? Thanks:confused:

      J Offline
      J Offline
      jhoga
      wrote on last edited by
      #2

      ok I found a solution this method from the MSDN worked. I'm not sure why at this point. When I figure it out I'll let you know. Using sr As StreamReader = New StreamReader("TestFile.txt") Dim line As String Do line = sr.ReadLine() Console.WriteLine(Line) Loop Until line Is Nothing sr.Close() End Using

      1 Reply Last reply
      0
      • J jhoga

        I'm in need of a quick answer to a problem. I am trying to parse a tab delimited file for the purpose of feed it to a check printer. I am using a stream reader and the issue is that the reader is dropping the first char of each line. Here's the code: Do While strRead.Read <> strRead.EndOfStream strTest = strRead.ReadLine strWrite = strTest.Replace("""", "") ListBox1.Items.Add(strWrite) Loop Can anybody help? Thanks:confused:

        L Offline
        L Offline
        Luc Pattyn
        wrote on last edited by
        #3

        Hi, I would guess strRead.Read really reads something, maybe one byte or so, and you don't process it. Did you care looking at the documentation of the classes you use? :)

        Luc Pattyn [Forum Guidelines] [My Articles]


        Voting for dummies? No thanks. X|


        J P 2 Replies Last reply
        0
        • J jhoga

          I'm in need of a quick answer to a problem. I am trying to parse a tab delimited file for the purpose of feed it to a check printer. I am using a stream reader and the issue is that the reader is dropping the first char of each line. Here's the code: Do While strRead.Read <> strRead.EndOfStream strTest = strRead.ReadLine strWrite = strTest.Replace("""", "") ListBox1.Items.Add(strWrite) Loop Can anybody help? Thanks:confused:

          T Offline
          T Offline
          Thomas Stockwell
          wrote on last edited by
          #4

          strRead.Read reads the first character of every line. do while not str.Read.EndOfStream ... loop

          Regards, Thomas Stockwell Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. Visit my homepage Oracle Studios Discounted or Free Software for Students: DreamSpark - downloads.channel8.msdn.com MSDN Academic Alliance - www.msdnaa.com

          1 Reply Last reply
          0
          • L Luc Pattyn

            Hi, I would guess strRead.Read really reads something, maybe one byte or so, and you don't process it. Did you care looking at the documentation of the classes you use? :)

            Luc Pattyn [Forum Guidelines] [My Articles]


            Voting for dummies? No thanks. X|


            J Offline
            J Offline
            jhoga
            wrote on last edited by
            #5

            Come on now read documentation? Who does that? No your right under the pressure of an angry ap clerk I did not research class well. Since I have been doing this since vb3 you'd think I'd know beter by now. :-O

            P 1 Reply Last reply
            0
            • L Luc Pattyn

              Hi, I would guess strRead.Read really reads something, maybe one byte or so, and you don't process it. Did you care looking at the documentation of the classes you use? :)

              Luc Pattyn [Forum Guidelines] [My Articles]


              Voting for dummies? No thanks. X|


              P Offline
              P Offline
              Paul Conrad
              wrote on last edited by
              #6

              Luc Pattyn wrote:

              Did you care looking at the documentation of the classes you use?

              He obviously didn't and can't believe the attitude he gave you in his reply about reading documentation.

              "The clue train passed his station without stopping." - John Simmons / outlaw programmer "Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon

              R 1 Reply Last reply
              0
              • J jhoga

                Come on now read documentation? Who does that? No your right under the pressure of an angry ap clerk I did not research class well. Since I have been doing this since vb3 you'd think I'd know beter by now. :-O

                P Offline
                P Offline
                Paul Conrad
                wrote on last edited by
                #7

                jhoga wrote:

                Come on now read documentation? Who does that?

                Real people.

                jhoga wrote:

                the pressure of an angry ap clerk

                Well, let's see the angry ap clerk do a better job, which I doubt :-\

                "The clue train passed his station without stopping." - John Simmons / outlaw programmer "Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon

                1 Reply Last reply
                0
                • P Paul Conrad

                  Luc Pattyn wrote:

                  Did you care looking at the documentation of the classes you use?

                  He obviously didn't and can't believe the attitude he gave you in his reply about reading documentation.

                  "The clue train passed his station without stopping." - John Simmons / outlaw programmer "Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon

                  R Offline
                  R Offline
                  RCoate
                  wrote on last edited by
                  #8

                  Paul Conrad wrote:

                  He obviously didn't and can't believe the attitude he gave you in his reply about reading documentation.

                  Did you get that he was poking fun at himself in his reply? Did you see the "Red face" emoticon? He wasn't giving any attitude. He was saying "Doh!".

                  P 1 Reply Last reply
                  0
                  • R RCoate

                    Paul Conrad wrote:

                    He obviously didn't and can't believe the attitude he gave you in his reply about reading documentation.

                    Did you get that he was poking fun at himself in his reply? Did you see the "Red face" emoticon? He wasn't giving any attitude. He was saying "Doh!".

                    P Offline
                    P Offline
                    Paul Conrad
                    wrote on last edited by
                    #9

                    RCoate wrote:

                    Did you get that he was poking fun at himself in his reply?

                    Looking back at it, yes.

                    "The clue train passed his station without stopping." - John Simmons / outlaw programmer "Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon

                    1 Reply Last reply
                    0
                    Reply
                    • Reply as topic
                    Log in to reply
                    • Oldest to Newest
                    • Newest to Oldest
                    • Most Votes


                    • Login

                    • Don't have an account? Register

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • World
                    • Users
                    • Groups