CPU Thrashed when Demo Application Maximised

Summary

Id: 12340.1
Type: Question Question
Current Status: Resolution Identified

Detail

29 Jan 2004 Resolution Identified Scott Reynolds

When maximized, got massive CPU thrashing. Changed this, which seems to fix it:

Private Sub tmrMove_Timer()
Static fLeft As Single, fTop As Single
   ' really use WM_MOVING for this, but for the sake of the demo:
   If Not (Me.Top = fTop) Or Not (Me.Left = fLeft) Then
      fTop = Me.Top
      fLeft = Me.Left
      Me.Refresh
   End If
End Sub