you could also send a message to the filelistbox to not draw until its finished.
um..... sendmessage(controls.handle, WM_SETREDRAW,0,0); to stop it, sendmessage(controls.handle, WM_SETREDRAW,1,0); to enable it again. I have doen this with listviews to speed them up. Jeremy -----Original Message----- From: Alistair George <[EMAIL PROTECTED]> To: Multiple recipients of list delphi <[EMAIL PROTECTED]> Date: Tue, 15 Oct 2002 16:32:48 +1300 Subject: [DUG]: Speed of code > Hi again. > Here is a routine which seems to run really slowly - any ideas why? and > if so, > what suggested solution tks, Al+ > > with FileListbox.Items do > begin > label1.caption:='Process - adding qualifiers'; > beginupdate; > for I := 0 to FileListbox.items.count-1 do > Strings[i]:=Strings[i]+'\*.*'; > endupdate; > end; > > ----------------------------------------------------------------------- > ---- > New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] > Website: http://www.delphi.org.nz > To UnSub, send email to: [EMAIL PROTECTED] > with body of "unsubscribe delphi" > Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/ --------------------------------------------------------------------------- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of "unsubscribe delphi" Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/