Form invalidate

I'm writing a simple directory / file enumeration program in VB 2005. I've added some code to use system.drawing to create a jpeg of each filename on a form and then save the jpeg in the same directory the file is in.

For test purposes I put a command button on the form to execute the routine which works fine, all files etc are listed in a text file and it creates a jpeg of each filename. However, under normal operation I would be calling the routine with arguments such as directory to list / whether to included subdirectories etc and in this case, the files are correctly enumerated in the textfile, but I only get a jpeg of the very last file in the enumeration. I have tried putting a me.invalidate between "for each file etc" and "next " to force a form redraw but this has no effect! I can't understand why it works from the form via a command button but not with arguments . . . . it's the same routine(!)

anyone advise me of why this should be - should I set the enumeration routine to run in a new thread ? (tried looking at this but can't quite understand it?

[1123 byte] By [DKeeper] at [2008-1-6]
# 1
You'll need to post a sample of the procedure - without seeing the code there's no way to tell what's going wrong.
rkimble at 2007-9-28 > top of Msdn Tech,Visual Basic,Visual Basic Language...