Refactor.
Using an Application.DoEvents equivalent to keep the UI from blocking.