Label.Text

  • Thread starter Thread starter Mike L
  • Start date Start date
M

Mike L

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
 
* "Mike L said:
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

Call the label's 'Refresh' method and/or post code.
 
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.
 
Back
Top