I have an old 16bit program, it runs very very slowly. However if I move the mouse around it speeds up!

Is there an easy way to send a "do nothing" windows message to the program in a loop. Hence speeding it up?

Cheers