>I personally have never used the Dock property
How do you live without this. It is one of the most useful properties
a Control has.
> When I resize the form, the listbox resizes virtually at the same time
> the form does.
Unfortunately virtually is not quite good enough for me. I need it to
appear smooth. This is a graphics app where the appearance is
important. Also you will find that as you increase the complexity of
the control it becomes more obvious.
Thanks for your help!
JS - 18 Jan 2008 16:10 GMT
Have you tried setting the Form's DoubleBuffered property to true?
Olie - 18 Jan 2008 16:36 GMT
> Have you tried setting the Form's DoubleBuffered property to true?
Yes, thanks! I almost mentioned this in the post because I knew it
would come up. When you set double buffering it only double buffers
what is directly drawn to your form. It has no effect on the child
controls in the form.
Bob Powell [MVP] - 18 Jan 2008 22:16 GMT
For graphics applications you should always:
Set the double buffering of the control on.
Set the ControlStyles to use UserPaint.
Override OnPaintBackground so that PaintBackground does not call the base
class.
Do your painting as efficiently as possible.

Signature
--
Bob Powell [MVP]
Visual C#, System.Drawing
Ramuseco Limited .NET consulting
http://www.ramuseco.com
Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm
Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm
All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.
>> Have you tried setting the Form's DoubleBuffered property to true?
>
> Yes, thanks! I almost mentioned this in the post because I knew it
> would come up. When you set double buffering it only double buffers
> what is directly drawn to your form. It has no effect on the child
> controls in the form.
zacks@construction-imaging.com - 18 Jan 2008 16:37 GMT
> >I personally have never used the Dock property
>
> How do you live without this. It is one of the most useful properties
> a Control has.
I have never designed a form that had only one control on it and it
had to fill up the entire form.
> > When I resize the form, the listbox resizes virtually at the same time
> > the form does.
[quoted text clipped - 5 lines]
>
> Thanks for your help!
You might try doing the resizing yourself in the Form_Resize event.
The .NET code may have unnecessary overhead that is slowing it down.