Take the 2-minute tour ×

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?

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.

share|improve this question
"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 Jul 12 '11 at 19:50
+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 Jul 12 '11 at 19:51
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 Jul 12 '11 at 19:52
Yes. I have seen that also. –  Altar Jul 12 '11 at 19:54
add comment

1 Answer

up vote 7 down vote accepted

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.

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.

share|improve this answer
Yet again we find good cause not use use DoubleBuffered. You don't need to use it to get rid of flickering and it breaks your app. –  David Heffernan Jul 12 '11 at 22:52
Actually, I want to enable double buffering (to prevent flickering when I resize the form(s)). –  Altar Jul 19 '11 at 18:45
It is possible to avoid flickering without double buffering –  David Heffernan Jul 19 '11 at 18:51
add comment

Your Answer


