Results 1 to 4 of 4
  1. #1

    Default Loading .LOG file in VB6


    hi there how is it possible to load the content of a log file into a listview or msflexgrid... i have attached here a screenshot of my log file

    in my log file i want to populate the data in three colums

    [img width=500 height=175]http://i6.photobucket.com/albums/y228/eByong/log.jpg[/img]


    1 2 3

  2. #2

    Default Re: Loading .LOG file in VB6

    See code below (untested):
    Code:
    dim line as string, var1 as string, var2 as string, var3 as string
    
    open "test.log" as #1
    do while not eof(1)
      input #1, line
      var1 = mid(line,1,10)  'adjust mid() parameters for column break/limit
      var2 = mid(line,11,5)
      var3 = mid(line,16, len(line) - 16)
    
      'populate msflexgrid with var1,var2 and var3
       .
       .
       .
    loop
    close #1

  3. #3

    Default Re: Loading .LOG file in VB6

    or you can use the split() function after reading every line.

  4. #4

    Default Re: Loading .LOG file in VB6

    somehow i found the work around...the log file that i have was a tab delimited.. i populate the content of the log file in a listview

  5.    Advertisement

Similar Threads

 
  1. Replies: 22
    Last Post: 02-17-2008, 04:01 PM
  2. Need help in VB6
    By nirdle_phogi in forum Programming
    Replies: 5
    Last Post: 03-13-2007, 12:45 AM
  3. Deleting deep freeze file in BIOS' using boot disk
    By l3inad in forum Software & Games (Old)
    Replies: 1
    Last Post: 01-05-2007, 02:14 PM
  4. how to attach a file in the thread? (help!)
    By vbrhitchz in forum Music & Radio
    Replies: 4
    Last Post: 10-21-2006, 11:00 PM
  5. What program is locking what file in XP?
    By tokidoki in forum Software & Games (Old)
    Replies: 10
    Last Post: 06-14-2006, 01:36 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
about us
We are the first Cebu Online Media.

iSTORYA.NET is Cebu's Biggest, Southern Philippines' Most Active, and the Philippines' Strongest Online Community!
follow us
#top