Re: "not responding" and refresh label question



I've been looking at all the different solutions on this group for an
application showing "not responding" when it is actually working. But
I have a further problem.

First a little background. My app is accessing an access database that
has approx 52k records. It has the fun task of trying to see if any of
those records duplicates. So it does this with the following:

(code isn't exact, but just shows method)

'connect to database.....
For a=1 to (record_size-found)
lbl_status="A currently is: " & a
database.Movefirst
Do While Not databse.EOF
If a.info=current_record.info then
found=found+1
end if
database.MoveNext
Loop
Next a

Thats a quick summary of it...standard loop inside a loop trick. What
happends when this runs is that the lbl_status will go white after
about 10 seconds and after about a minute the menubar shows "not
responding". I've let it run before and told it to stop at certain
points (like when found=10) and it does stop at the right places. But
what I'd like it primary to be able to see the lbl_status updating and
not have it show up as a white block.

I've tried various things. I tried the sleep method, that didn't help
much. I tried writing a loop that goes nowere - that helped with the
"not responding" but didn't let me see the lbl_status update - still a
white block.

Any suggestions?

Two things. First, I am assuming lbl_status is a Label control. If so, you
should not rely on the default property when using it... it makes it harder
for others to read your code. So, first, change this line...

lbl_status = "A currently is: " & a

to this

lbl_status.Caption = "A currently is: " & a

Next, to show its contents as they update, add this line immediately after
it...

lbl_status.Refresh

See if that helps you out.

Rick


.



Relevant Pages

  • Re: "not responding" and refresh label question
    ... application showing "not responding" when it is actually working. ... Thats a quick summary of it...standard loop inside a loop trick. ... not have it show up as a white block. ... I tried the sleep method, ...
    (microsoft.public.vb.general.discussion)
  • "not responding" and refresh label question
    ... application showing "not responding" when it is actually working. ... Thats a quick summary of it...standard loop inside a loop trick. ... not have it show up as a white block. ... I tried the sleep method, ...
    (microsoft.public.vb.general.discussion)
  • Re: Question about Delphi versus other languages
    ... Wait a perceptable amount of time. ... The difference between responding in 50ms ... The point is that in an i/o bound operation with a generally short loop ... usually significant. ...
    (comp.lang.pascal.delphi.misc)
  • Re: Using regular expressions
    ... [Please do not quote the whole message you are responding to, ... what's needed to give context. ... >> using a for loop will read the whole file into a list in memory. ...
    (perl.beginners)

Loading