I am currently creating a program in vb6 that reads thousands of lines from a text file. So I use loop to read each line. It works perfectly but the problem occur when I run the program and try to minimize the form or try to use another application. Seems that the form lost it focus and isnt responding though it is still in the state of processing the loop.
13 5442
why don't you read the entire file at once and then process the data line by line .
why don't you read the entire file at once and then process the data line by line .
tnx for replying... Is'nt it the same? I mean, If I read the entire file where should I store it?? and how I will retrieve it line by line? I will still use loop right??... sorry Im new to visual basic..
but that certainly involvs less disc I/O.
tnx for replying... Is'nt it the same? I mean, If I read the entire file where should I store it?? and how I will retrieve it line by line? I will still use loop right??... sorry Im new to visual basic..
Hi!
May I Know, For What purpose you are trying to read it Line By Line.
Can you please give your coding here in this forum.
With Regards
Vijay. R
Simply use DoEvents inside the “for” loop. Then you can resize the form.
Note: You cannot read file content line by line. Whenever you open the file to read then the control starts from the first line in that file because there is no line ID to point the control to a particular line.
Simply use DoEvents inside the “for” loop. Then you can resize the form.
Note: You cannot read file content line by line. Whenever you open the file to read then the control starts from the first line in that file because there is no line ID to point the control to a particular line.
Hei guys.. Thanks for helping me.. I just need DoEvents inside the loop.. Thanks again...
Note: You cannot read file content line by line.
I think we have a bit of a language mix-up here. I use VB6 to "read file content line by line" all the time. So what are you referring to, Hari?
Sorry for the improper explanation.
I mean if you
1. Open the file and read a line
2. Close the file
3. Again open file and try to read second (or any particular line) line. ‘This is not possible
Is'nt it the same? I mean, If I read the entire file where should I store it?? and how I will retrieve it line by line? I will still use loop right??... sorry Im new to visual basic..
I see what you mean. Yes, each time you open the file the pointer will be reset to the beginning.
Technically, in such a case I suppose you could track where you were up to each time, and reposition after opening the next time. But of course, why would you want to? :)
I agree it is possible technically to reposition and I just pointed do not try like retrieve data from database table using IDs, because one of my teammate faced same problem in VB.
I agree it is possible technically to reposition and I just pointed do not try like retrieve data from database table using IDs, because one of my teammate faced same problem in VB.
It's quite amazing (and amusing) sometimes to see the hoops that people jump through to perform a simple function - am I right? :-)
maybe you can add Doevents in your looping
Sign in to post your reply or Sign up for a free account.
Similar topics
by: muser |
last post by:
With the following code I'm trying to read a text file (infile) and
output inaccuracies to the error file (printerfile). The text file is
written and stored on disk, while the printerfile has to be...
|
by: Citoyen du Monde |
last post by:
Trying to get some ideas on a simple javascript project (to teach myself the
language).
I want to develop a client-side vocabulary practice application that would
allow users to
enter their own...
|
by: Eric Lilja |
last post by:
Hello, I have a text file that contains a number of entries describing a
recipe. Each entry consists of a number of strings. Here's an example file
with only one entry (recipe):
Name=Maple Quill...
|
by: dale zhang |
last post by:
Hi,
I am trying to read an image from MS Access DB based on the following article:
http://www.vbdotnetheaven.com/Code/Sept2003/2175.asp
The article author is using PictureBox for windows...
|
by: dale zhang |
last post by:
Hi,
I am trying to save and read an image from MS Access DB based on the
following article:
http://www.vbdotnetheaven.com/Code/Sept2003/2175.asp
Right now, I saved images without any...
|
by: Colin McGuire |
last post by:
Hi, is there a way to show a form without a titlebar (and therefore no
control box/minimize box/title etc) but still have it appear looking
like 3D?
The property FormBorderStyle to None - this...
|
by: jobi |
last post by:
Hi,
I'm trying to develop this vb.net application which gathers info.
When I start the gathering process, I refresh text-fields in the form to see
progress and to see where it gets.
This works...
|
by: EPDJ |
last post by:
Well, I have to edit a program which we previously used for reading a header file to be able to read a trailer from a .dat file. The .dat file consists of 5 entries in each record and I am assuming...
|
by: Coward 9 |
last post by:
HI,
I saw in an example hello.aspx, there is a <form tagbeing used like
<form runat="server>
I search all html tag references and could NOT find "runat" attributes
for <formtag.
which...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome former...
|
by: ryjfgjl |
last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
| |