I have a bunch of controls on my window. One of them is a refresh button that performs a cumbersome task on a background thread.
When the user clicks the refresh button, I put the cursor in a wait (hourglass) status and disable the whole window -- Me.IsEnabled = False
.
I'd like to support cancellation of the refresh action by letting the user click a cancel button, but I can't facilitate this while the whole window is disabled.
Is there a way to do this besides disabling each control (except for the cancel button) one by one and then re-enabling them one by one when the user clicks cancel?