VB6 Beginner for TextBox


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 4 of 4

Thread: VB6 Beginner for TextBox

  1. #1
    Join Date
    Jun 2005
    Posts
    1

    Lightbulb VB6 Beginner for TextBox

    I'm sort of new to VB6, and I'm reading a txt file into a textbox. What I need to do is to ignore the first 80 characters of the text file line and read the remaining line into the textbox. I can't figure this small issue out. Any help? Thanks.

  2. #2
    Join Date
    Jan 2004
    Location
    Alexandria, VA
    Posts
    392
    If you read the data into a string variable first, you can do something like this:

    strData = Right$(strData, 81, Len(strData)-80)
    Bob Rouse
    Dimension Data

  3. #3
    Join Date
    Nov 2003
    Location
    Portland, OR
    Posts
    8,387
    You can use VB's Seek statement to position the file pointer to the 81st byte (or 162nd byte, if the file contains Unicode data). Look up Seek in VB's online help for more information.
    Phil Weber
    http://www.philweber.com

    Please post questions to the forums, where others may benefit.
    I do not offer free assistance by e-mail. Thank you!

  4. #4
    Join Date
    Feb 2004
    Location
    Sydney, Australia
    Posts
    498
    Or ...

    strData = Mid$(strData, 81)

    Or ....

    Open the file as Random with Len=1 and read from record 81 ....

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center