Board index » delphi » Supress redraw during resize.

Supress redraw during resize.

Can anyone help me...?

I'm using Delphi 2.0.

My application has a bunch of MDI child forms.
I have added in a bunch of code to move/resize various panels and
components so that if the user is using 1024*768 or 800*600
they appear proportionally similar etc.

When they are displayed it takes quite literally seconds to draw
on fairly fast P166 machines, and I can even see the components
stretching as they are resized.

What I would dearly love to do is to supress the redraw until
all of the resizing is done. How can I do this?

Any help will be gratefully appreciated.

Jeremy.

 

Re:Supress redraw during resize.


You might try a call to LockWindowUpdate at the start of your
resizing-routine. You call it *before* resizing with as an argument the
handle of the resizing window (Self.Handle), and *after* the resizing you
call it again with 0 (zero) as an argument.

Regards,
Wilco

Jeremy Twiggs heeft geschreven in bericht
<01bddfe3$fd1f5060$130210ac@jeremy>...

Quote
>Can anyone help me...?

>I'm using Delphi 2.0.

>My application has a bunch of MDI child forms.
>I have added in a bunch of code to move/resize various panels and
>components so that if the user is using 1024*768 or 800*600
>they appear proportionally similar etc.

>When they are displayed it takes quite literally seconds to draw
>on fairly fast P166 machines, and I can even see the components
>stretching as they are resized.

>What I would dearly love to do is to supress the redraw until
>all of the resizing is done. How can I do this?

>Any help will be gratefully appreciated.

>Jeremy.

Other Threads