THotKey 在 Delphi XE 下不再工作
我已将一个旧项目从 Delphi 7 升级到 Delphi XE。 该项目有(除其他外)一些 THotKey 控件。在 Delphi 7 下,THotKey 控件工作正常。但在 Delphi XE 下它们就像被禁用一样。这意味着即使为它们分配了快捷方式(例如 Alt+A),它们内部也不会显示任何内容,并且我无法编辑它们。
还有其他人有这个问题吗?
更新:
我删除了该项目中的所有控件和所有代码。现在我只有主窗体和一个 THotKey 控件。基本上,删除所有控件后,我的项目就像一个全新创建的项目,没有一行代码。但是THotKey在Delphi XE下仍然无法工作,在D7下仍然可以工作。
I have upgraded an old project from Delphi 7 to Delphi XE.
The project has (among others) some THotKey controls. Under Delphi 7 the THotKey controls are working ok. But under Delphi XE they are like disabled. This means that they show nothing inside even if a shortcut (Alt+A for example) is assigned to them and I cannot edit them.
Anybody else has this issue?
Update:
I deleted ALL controls and all code from that project. Now I have ONLY the main form and a single THotKey control. Basically, after deleting all the controls my project is like a brand new created project without a single line of code. But the THotKey is still not working under Delphi XE and still works under D7.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
找到原因(Delphi bug)
我将我的项目与新创建的项目进行了比较。我发现旧表单设置了“双缓冲”选项,而在新项目中未启用此选项,因此我在旧表单中手动关闭了此选项。你猜怎么着? THotKey 有效!!!!!!每次我打开“双缓冲”时,THotKey 都会变得很慢。
已确认
是(作者:Andreas Rejbrand)
解决方案(部分):
我发现实际上并不是主窗体的 DoubleBuffered 属性导致了这个问题,而是 THotKey 的属性导致了这个问题。因此,关闭 THotKey 的此属性就足够了,而不是整个表单。我想我可以离开了。
:)
Cause found (Delphi bug)
I compared my project with a new created project. I have seen that the old form had the 'double buffering' option set while in the new project this was not on, so I manually turned off this option in my old form. Guess what? The THotKey works!!!!!!! Every time I turn the 'double buffering' on, the THotKey goes ape.
Confirmed
Yes (by Andreas Rejbrand)
Solution (partial):
I have seen that it is not actually main form's DoubleBuffered property that causes this but rather THotKey's. So it is enough to turn off this property for THotKey, not for entire form. I think I can leave with that.
:)