If you are using a progress bar, this suggests a loop. If this is the case then you can use "DoEvents".
This will cause the loop to yeild processor time to other tasks that the computer needs to do. Minimizing and Maximizing are such events. The form needs to get repainted etc, which will not happen if you are looping, unless you use DoEvents.
Be careful of DoEvents though as it can slow down loop processes. It may be worthwhile using a counter so that DoEvents is only called once every so many times around the loop.
Hope this helps.Code:While notDone 'do task lCount = lCount + 1 'Only do DoEvents every ten times around the loop If lCount Mod 10 = 0 Then DoEvents End If Wend![]()




Reply With Quote