For example, two user control. CTL are designed to be added to Form 1.

In design mode. Controls need to be subclassed.

Does not compile to exe, nor does it run F5

The main code is triggered when the control resizes. Show, UserControl_Terminate Event

There is also a transparent windowless control.It responds to all events of mouse movement.


Add security subclassing in these places
If you close the window. All user controls are destroyed.
I selected Form 1. But the time the form was unloaded did not triggerIt is equivalent to being forced to end the process.

Events are incomplete and unsafe.