
Help required with Timer Event, DoEvents, Sleep...an easy one
Hello all,
I have started to use Visual Basic after being away from it for quite
a while now. I had got used to VB 3.0 Prof. a few years ago and then
had a couple of years out.
Now I have VB4.
Previously I used to use a timer event to control a progress bar/gauge
during a timely operation. If during the process the timer was unable
to kick in due 'busy' processes I used to use DoEvents and this
cleared things up.
Now I have the problem of the timer events not occuring whilst I am
reading in a lengthy file file and I really want to plot its progress.
In the help the 'sleep' API call is referred to and it gives you the
declaration to use but it gives me an invalid use of declaration
error.
Now I read in a large file taking a few minutes and even though the
timer event is set to an interval of 1 second it only updates right at
the very end.
When I say 'read in' a large file I mean using the 'line input #1'
statement. So there should be ample opportunity for a timer event to
kick in.
I am at a loss and would appreciate any help.
Phil Lowe