Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27554

GUI Update Question

$
0
0
Hi All,
I have an application where I have to update a large amount of text boxes/labels across several different tabs on a form. (tabbed dialog control)
I'm seeing some lag, and I'd like to try to speed it up if at all possible.

On a timer, every 250 ms (the rate the customer likes to see the fields bounce around) I have the textboxes/labels updating. The updating includes text changes, color changes, and sometimes enabled/disabled.

Not every textbox/label changes value on update... in fact. In fact quite often I'm in the situation below:

currentRate = "5.02%"

In the gui update timer:
label1.text = currentRate
and current rate doesn't change that often.

When the text is set to the exact same text as before, does a redraw or paint (or whatever label/textboxes use) fire? Would it be faster to do...


if label1.text <> currentRate then
label1.text = currentRate
end if


Same with enabled etc.?

Lastly, if a control is not currently visible, is there a way to tell it not to update? Or does .net handle that for me?

Thanks!
Nick

Viewing all articles
Browse latest Browse all 27554

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>