changed Sleep(100) to Sleep(5) when minimized