I'm maintaining a Windows forms application that sits on top of (in front of?) another company's application. Our application has two click-thru panels over two specific areas of the other application that the user needs to have access to. Our application is built in C# using VS2017 on .NET4. Between Windows 7 and Windows 10, something has changed, and I'm hoping someone has run into it before and has a solution. (I should note that I have the same issue when building with .Net 4.7.2.)
Our application's form has two track bars that fully occupy the space between the two transparent panels, see the image above. On Windows 7, this wasn't any problem. On Windows 10, the handle for the track bar that sits immediately below the upper panel is essentially disabled. The mouse can't grab the handle. Normally, when the mouse grabs the track bar handle, it turns from blue to black. On Windows 10, that doesn't happen and the handle can't be dragged. The trackbars are controlling some overlay information in the lower click-thru panel.
After much experimentation, I discovered the following:
If the TransparencyKey for our form is set to a color that allows for click-thru, the mouse can't grab the trackbar. If the TransparencyKey is set to a color that doesn't allow click-thru, then the mouse can grab the handle. It appears that there is around a 28-pixel zone below the click-thru panel that disables clicking anything on our form. In fact, I created a test app that uses the Click method on the main form to detect mouse clicks. It does not get invoked for any mouse clicks in this "dead" zone below the click-thru panel.
My current workaround is to reduce the size of the two trackbars so that they fit between the "dead" zone and the lower panel. Anyone have a solution or a better workaround?
Thanks.