Slow adding controls . Please Help!

N

news.xnet.hr

Hi All!

I'm doing a little app for browsing images(like ACDSee). All thumbnails are
actually panels with imageboxes and labels for image properties (like
ACDSee).
What I'm doing is first fill the FileInfo[] with (image)files from selected
folder.
After that I have a loop for putting the thumbnails on the screen, on the
right position(nothing special, just calling new thumbnail class derived
from PanelClass per loop).
What the problem is that thumbnail-panel drawing is rather slow. For a 350
files(350 panels) I have to wait for a 7-8 secs. I've discovered that labels
are slowing things downs drastically. When not drawing them I got dramatical
improvement, drawing cuts to 2-3 sec.
But this is also a bit slow compared to similar applications ...

Please help with some advice, how to speed up the label drawing and actual
panel drawing.

P.S.
I'm doing an image shrinking and putting on the panel on the second
loop(after all panels are placed), so this problem involves just a panel and
label drawing, not image rescaling.

Thanx in advance!
D;)
 
G

Guest

Have a look at SuspendLayout and see if you can cause all your controls to
draw at once?

regds
brian
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top