With time-critical code a DoEvents statement actually defeats the purpose, because it tells Windows to put your app on the 'back burner' to process other pending tasks before returning. If the loop is causing your computer to hang (and you've given it sufficient time to complete), I'd be surprised if there's any other reason except that the While condition never becomes true. An example of this is something I do to myself all the time:
Dim RS As ADODB.Recordset
Do While Not RS.EOF
'Statements
'More Statements
Loop
With a DoEvents in this loop or not, it will never exit unless RS.EOF will at some point be a True statement:
Do While Not RS.EOF
'Statements
'More Statements
RS.MoveNext
Loop
As far as the procedure running as fast as the processor can, I think fine-tuning your code and running as few background apps as possible can get you close. Since your VB app is a Windows thread, Windows reserves the right to give priority to someone else. You can try to make up for this with tecniques like using Long (32 bit) integers instead of Integers, using functions like Left$() and Mid$() instead of Left() and Mid(), and using short-circuit evaluation in Select Case statements. In the Ctrl+Alt+Del program list (Win9X) the only programs that need to be running are Explorer and Systray. Closing the others can speed things up. Finally, if you're REALLY concerned about speed, consider using a different language like C/C++ or assembly. VB is just too high-level to compete in a code race.
HTH.
~Mike
Any man willing to sacrifice liberty for security deserves neither liberty nor security.
-Ben Franklin