thanks for the promt reply mate.

but the whole program is way over my head.

I have a huge application now, about 600 lines of code, to redo everything is a bit tough.

Is there a simple function, using which i can get back the control for the GUI while the reading takes place in the background??

can i use the sleep command in the the reading function to get a small amount of work done?

thanks.