Window Sitters - 分层窗口颜色键控和点击
几年前,我在 Visual Basic 6 中制作了一个窗口管理员,它使用分层窗口颜色键控轻松地将窗体变成非矩形。
本周早些时候,我尝试用 C# 重写窗口管理员,认为旧代码一团糟,并注意到表单客户端矩形内的任何点击都会被表单捕获,而 VB6 版本的点击则落在以下位置:您没有单击任何可见部分。 这当然是一件非常重要的事情。
手动调用分层 Windows API (VB6) 和我不知道的 TransparancyKey 属性 (.Net) 之间是否存在一些区别,或者这里还有更多区别?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
有一对与 TransparencyKey 相关的错误。 您在这里讨论的情况似乎并非如此,但如果 API 存在更多问题,我不会感到惊讶。
我们需要查看一些代码来尝试诊断到底发生了什么。
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.