Resizing application's window

  • Thread starter Thread starter Robot
  • Start date Start date
R

Robot

Hello,

I'm developing an application in C# .NET.
I have a problem with components flickering
during resizing window. I realized that some
application (e.g. Mozilla Firefox) doesn't
redraw all the components all the time of
resizing a window - it just draw a gray rectangle.
And then, after mouse button goes up, it
refreshes a window.
How to achive such effect?
Interesting thing is that sometimes Mozilla
Firefox is refreshing window during resizing,
and sometimes it is drawing gray rectangle.

Thanks in advance,

Robot.
 
I don't think that's done in the code, I think it's an Windows OS setting.
If you right-click on the desktop and select properties,
then select the appearance tab, then click on Effects...
There's a check-box labeled 'Show window contents while dragging'.
This checkbox also affects when you resize the window wether you see
the contents move as you resize or just see the rectangle.
Its very handy if you're on a slow computer.

I can't say what's causing the flickering. Depends on what's being
redrawn while the window is being sized.
If you're using a .net control (i.e. textbox) you can use the anchor
property to have the control change size with your window.

-Steve
 
Back
Top