Delphi: a modal form flickers
There is a modal form with: labels, buttons, group boxes.
I call from a Form 1 on a button click: Form2.ShowModal;
When the form 2 appears first - all is ok be开发者_如何学Ccause of a blend effect. But next form's appearance has a flicker, especially labels, buttons. I tried to use DoubleBuffered:=True/False and ParentFont:=True/False (in case of a group box, frame)
. It doesn't help :(
Can anybody help please? Thanks!
OK this will do the trick, replace this solution if there are any better...
1st, OnFormCreate
Form2.AlphaBlendValue := 0;
Form2.AlphaBlend := true;
2nd, Add Timer, OnTimerEvent
Form2.AlphaBlendValue := 255;
Form2.AlphaBlend := false;
Timer1.Enable := False;
3rd OnFormShow
Timer1.Enable := True;
精彩评论