Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

THotKey does not work anymore under Delphi XE

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.

like image 441
Server Overflow Avatar asked Jul 12 '11 19:07

Server Overflow


1 Answers

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.
:)

like image 78
Server Overflow Avatar answered Nov 13 '22 20:11

Server Overflow