Label.Text

Label.Text

Post by Mike » Fri, 20 Feb 2004 03:32:40


Hello all,

My progam have a lable control, the label text changes dynamically when the
program is running. For some reason, the lable text did not show the text
change at all. I added a sub like

sub L1_Textchanged(...) handles L1.TextChanged
refresh()
end sub

still not working. Any ideas?

Mike
 
 
 

Label.Text

Post by hirf-spam- » Fri, 20 Feb 2004 04:02:01

* "Mike L" < XXXX@XXXXX.COM > scripsit:

Call the label's 'Refresh' method and/or post code.

--
Herfried K. Wagner [MVP]
< http://www.yqcomputer.com/ ;

 
 
 

Label.Text

Post by 10 » Fri, 20 Feb 2004 04:31:19

Hi Mike
I think you have some long processing going on on your main UI thread and
you wan't to show the status of this processing in the label control.

The rest of my post is in case that my assumption is correct.

If you block the UI thread in some long cycle it won't process the message
queue and the controls won't receive their messages. So you might call
Refresh but without pumping out the messages from the message queue label
control won't receive its WM_PAINT event and won't update itself.

So what you can do is either to run your long processing in a worker thread
or call periodically Application.DoEvents as the processing goes to keep
your controls alive.

--
HTH
B\rgds
100



the
 
 
 

Label.Text

Post by Mike » Fri, 20 Feb 2004 04:56:07

Thank you guys, problem solved.

Mike



the
text