Screen not updating/hourglass
Posted on 2002-06-20
My app is reading and processing a large file and sometimes won't update my progress gauge (code below). Also, the cursor will change to an hourglass (but when I move to other applications I have running, the cursor returns to a normal arrow). My app doesn't lock while this is going in however, it still runs fine...just my status gauge won't update while it's running.
The funny thing is that this behaviour doesn't happen all the time - sometimes I'll run the app and the progress gauge will update fine and the cursor doesn't turn to an hourglass. Very strange.
Here's my code (my gauge should refresh every 10 records read):
if multitask then Application.ProcessMessages;
blockread(fromfile, buf, 1, numread);
recsread:=recsread + 1;
for z:=0 to 49151 do
if ((ord(buf[z])>= 0) and (ord(buf[z]) <= 31)) or
((ord(buf[z])>= 127) and (ord(buf[z]) <= 255)) then
if bigstring <> '' then find_valid;
if length(bigstring) = 255 then find_valid;
bytes_processed:=bytes_processed + 49152;
if recsread mod 10 = 0 then
I'm using Windows XP Home, and Delphi 3 Pro.