I want to somehow make a windows forms control unresponsible - like setting Control.Enabled to False, but without the visual effects of it (I will have some custom "control is busy" indicator, so it will not be unclear to the end-user why the control is unresponsive).
The reason is: I'm writing a busy indicator control for windows forms and want it to be as generic as possible.
The aim is to be able to use it like following.
Dim busy_control As Control = ...
ShowBusyIndicator(busy_control)
BeginDoWork() 'starts a worker thread
'in some OnCompleted-Event:
HideBusyIndicator(busy_control)
My current problem is, I want to be sure the busy_control will not react to any user input at all.
In the current version, I make sure the control looses focus and can never get it again by handling the GotFocus event. Since the Parent of the overlay control is the busy_control, I also set the OnMouseWheel event to handled (else busy_control could be scrolled).
I guess there are more such events. That's why I'd like to "disable" a control without actually setting enabled to false.
Is there any way to do this?