7
votes

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.

1
"Basically, after deleting all the controls my project is like a brand new created project without a single line of code." I don't believe you. Create a new VCL project, and drop a THotKey onto the main form. Then it will work.Andreas Rejbrand
+1. You are completely right. Please, write an answer to this question yourself. This will make this question useful to others, and -- as a bonus -- you will get some 'free' rep for it!Andreas Rejbrand
However, of course -- you can have the form DoubleBuffered := true. The important thing is that the hot key control is not double buffered.Andreas Rejbrand

1 Answers

9
votes

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