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
|