Simple dialogue animé
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
procedure TForm1.Button1Click(Sender: TObject);
var
  Src,Dest:TRect;
begin
   with CreateMessageDialog('Message', mtWarning, [mbYes, mbNo]) do
   try
      with Button1 do
      begin
       Src.TopLeft     := ClientToScreen(Point(0, 0));
       Src.BottomRight := ClientToScreen(Point(Width, Height));
      end;
      Dest.TopLeft     := ClientToScreen(Point(0, 0));
      Dest.BottomRight := ClientToScreen(Point(Width, Height));
      DrawAnimatedRects(Handle, IDANI_CAPTION, Src, Dest);
      if ShowModal()=mrOk then
      begin
         //Si OK
      end;
      DrawAnimatedRects(Handle, IDANI_CAPTION, Dest, Src);
   finally
     Free();
   end;
end;