EXE from Delphi 2006: Buttons / Checkmark / Radio are not displayed until the mouse crashes (in Vista / Win7)

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

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

This seems to be related to hiding / showing accelerator keys (defualt is hidden in Vista / Win7).

What can I do to avoid this?

+5
source share
4 answers

I think this is a better / simple workaround . It just requires a single line of code in the main OnCreate form.

+2
source

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

+3
source

procedure TForm1.FormKeyDown (sender: TObject; var Key: Word; Shift: TShiftState); start if Key = 18 then Key: = 0; end;

0
source

All Articles