C# – Window Sitters – layered windows colorkeying and clickthrough

clayered-windowsvb6winapi

I made a window sitter in Visual Basic 6 a few years back, which used layered windows colorkeying to painlessly make the form nonrectangular.

I tried to rewrite the window sitter in C# earlier this week, judging that the old code was a mess, and noticed that any clicks within the form's client rectangle were caught by the form, while the VB6 version's clicks fell through to whatever was below if you didn't click within any visible parts. This is a very important matter ofcourse.

Is there some difference between calling the Layered Windows API by hand (VB6) and the TransparancyKey property (.Net) that I'm not aware of, or is there more at hand here?

Best Answer

There are a couple of bugs related to TransparencyKey. Neither seems to be the case you're discussing here, but I wouldn't be surprised if there are more issues with the API.

We'll need to see some code to try and diagnose what is going on exactly.