"Damir" <(E-Mail Removed)> wrote in message
news:u$(E-Mail Removed)...
> Hallo
>
> There is on my opinion not a really better way, and the CPU is not really
> used 100%. Its because "while" command.
I disagree. If the Task Manager shows the CPU usage at 100%, then it likely
is actually at 100%. The code posted basically tries to redraw the graphics
as fast as possible, and in this scenario the only real limit is the CPU, so
CPU usage will naturally be at 100%.
> You can put it into separate thread, this will probably work much better.
Moving the code to a different thread won't have any effect at all on
performance (and will, of course, create a cross-thread form access
problem).
Pete
|