views:

117

answers:

3

Under Windows Vista and Win7 there is a problem with applications created by Delphi (we use Delphi 2006, but it seems other versions have the same problem) which contain the XP manifest.

All descendants of TButtonControl (TButton, TCheckBox, TRadioButton, but not TBitBtn) are not visible after a form is initially shown. The controls appear when you move the mouse over them. And it only happens once for each form, until I restart the application.

It seems to be related to the hiding/showing of the accelerator keys (defualt is hidden on Vista/Win7).

What can I do to avoid this?

+6  A: 

This is a Delphi bug.

Alexander
Yup, fixed in Delphi 2007
glob
+2  A: 

The problem disappears if you compile a new XP manifest and replace WindowsXP.res with it.

histrio
+1  A: 

I think that this is the best / easiest workaround. It just requires one line of code in main form's OnCreate.

vrad
The VistaAltFix http://exodus.googlecode.com/svn/trunk/exodus/VistaAltFixUnit.pas works perfectly, without any hassle. Thanks a lot.
Dirk Paessler