Window over-redrawing itself
-
I developed a prototype GUI with Visual Basic .NET 2005. The problem that I am having is with window redrawing itself. I have two forms (two windows) and when one form shows the second form { .Update() and .Show() } and hides itself { .Hide() }, the second form redraws itself twice - one before .Hide() and the other one after it. I need to prevent this redrawing, because it is useless and looks ugly. Do you have any suggestions on how to do that? Thank you
-
I developed a prototype GUI with Visual Basic .NET 2005. The problem that I am having is with window redrawing itself. I have two forms (two windows) and when one form shows the second form { .Update() and .Show() } and hides itself { .Hide() }, the second form redraws itself twice - one before .Hide() and the other one after it. I need to prevent this redrawing, because it is useless and looks ugly. Do you have any suggestions on how to do that? Thank you
Why are you calling Update on this second form, then Show?? You're telling the form to redraw itself twice, then it might do it again after you call Hide on the first form. Don't call Update when you don't need it. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
-
Why are you calling Update on this second form, then Show?? You're telling the form to redraw itself twice, then it might do it again after you call Hide on the first form. Don't call Update when you don't need it. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
The thing is that this is supposed to be a "fancy interface". When a user does some manipulations and clicks a button, one window gradually disappears while the other gradually appears. The implementation based on changing Opacity property. I have just tried without update and show, and I am getting the same effect - right after the opacity reaches 100% for one and 0% for another form, the visible form starts redrawing itself completely. Looks like something tells the window to redraw itself completely with all its children. And this something seems to reside outside my code...
-
The thing is that this is supposed to be a "fancy interface". When a user does some manipulations and clicks a button, one window gradually disappears while the other gradually appears. The implementation based on changing Opacity property. I have just tried without update and show, and I am getting the same effect - right after the opacity reaches 100% for one and 0% for another form, the visible form starts redrawing itself completely. Looks like something tells the window to redraw itself completely with all its children. And this something seems to reside outside my code...
Now I know what you're talking about. No, there is nothing you can do about it. This is something that happens in Windows Forms. I haven't been able to find anything documenting what's causing it. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome