Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

EXE from Delphi 2006 : Buttons/Checkbox/Radios not visible until mouse is hovered (on Vista/Win7)

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?

like image 295
Dirk Paessler Avatar asked Jul 09 '10 08:07

Dirk Paessler


3 Answers

This is a Delphi bug.

like image 101
Alex Avatar answered Oct 05 '22 13:10

Alex


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

like image 26
histrio Avatar answered Oct 05 '22 13:10

histrio


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

like image 35
vrad Avatar answered Oct 05 '22 14:10

vrad