Give it Some Time to Relax
Posted on 2000-03-23
I often write code that force my computer to process a huge amount of data. In these cases, the computer seems to allocate all its ressources to this hungry operation, forgetting to refresh the new screen display.
For instance, in the program I am currently building, I press a button which does the following tasks:
- Change my mousepointer to hourglass;
(screen.mousepointer = vbhourglass)
- Make a grid invisible;
(msgWhatever.visible = false)
- Process heavy data.
The problem is: the processor never allow my mouse cursor to change, nor the grid to become invisible. I seek a clean and efficient way to give some processor time to these others simple visual tasks. For now, I'm stuck with DOEVENTS, which works SOMETIMES. Am I using this function the wrong way?