Author: Jonas Bilinkevicius
When I minimize a progam written in Delphi there's no animation on minimizing and
restore. How can I enable this?
Answer:
1 //In FormShow:
2
3 var
4 RecS, RecL: TRect;
5 begin
6 RecS := Rect(Screen.Width, Screen.Height, Screen.Width, Screen.Height);
7 RecL := ThisForm.BoundsRect;
8 DrawAnimatedRects(GetDesktopWindow, IDANI_CAPTION, RecS, RecL);
9 { ... }
10 end;
11
12 //In FormHide:
13
14 var
15 RecS, RecL: TRect;
16 begin
17 HideTimer.Enabled := False;
18 RecS := Rect(Screen.Width, Screen.Height, Screen.Width, Screen.Height);
19 RecL := ThisForm.BoundsRect;
20 DrawAnimatedRects(GetDesktopWindow, IDANI_CAPTION, RecL, RecS);
21 end;
|