Advertisement
anticlown

круглая форма

Apr 21st, 2023 (edited)
187
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Delphi 1.47 KB | None | 0 0
  1. Unit EnjoyChessLoadingScreen;
  2.  
  3. Interface
  4.  
  5. Uses
  6.     Windows,
  7.     Winapi.Messages,
  8.     System.SysUtils,
  9.     System.Variants,
  10.     System.Classes,
  11.     Vcl.Graphics,
  12.     Vcl.Controls,
  13.     Vcl.Forms,
  14.     Vcl.Dialogs,
  15.     Vcl.StdCtrls,
  16.     Vcl.ExtCtrls,
  17.     Vcl.ComCtrls,
  18.     EnjoyChessDataImages,
  19.     Vcl.VirtualImage,
  20.     Vcl.Imaging.Pngimage;
  21.  
  22. Type
  23.     TfrmLoadingScreen = Class(TForm)
  24.         TmrEndLoadingScreen: TTimer;
  25.         TmrAlphaBlendChanging: TTimer;
  26.         ImLogo: TImage;
  27.     lbLogo1: TLabel;
  28.     lbLogo2: TLabel;
  29.         Procedure TmrEndLoadingScreenTimer(Sender: TObject);
  30.         Procedure FormCreate(Sender: TObject);
  31.         Procedure TmrAlphaBlendChangingTimer(Sender: TObject);
  32.     End;
  33.  
  34. Var
  35.     FrmLoadingScreen: TfrmLoadingScreen;
  36.  
  37. Implementation
  38.  
  39. {$R *.dfm}
  40.  
  41. Procedure TfrmLoadingScreen.FormCreate(Sender: TObject);
  42. Var
  43.     HRgn: Cardinal;
  44. Begin
  45.     HRgn := CreateEllipticRgn(0, 0, 500, 500);
  46.     SetWindowRgn(Handle, HRgn, False);
  47.  
  48.     TmrEndLoadingScreen.Enabled := True;
  49.     TmrAlphaBlendChanging.Enabled := True;
  50. End;
  51.  
  52. Procedure TfrmLoadingScreen.TmrAlphaBlendChangingTimer(Sender: TObject);
  53. Begin
  54.     If FrmLoadingScreen.AlphaBlendValue > 253 Then
  55.         TmrAlphaBlendChanging.Enabled := False
  56.     Else
  57.         FrmLoadingScreen.AlphaBlendValue := FrmLoadingScreen.AlphaBlendValue + 2;
  58. End;
  59.  
  60. Procedure TfrmLoadingScreen.TmrEndLoadingScreenTimer(Sender: TObject);
  61. Begin
  62.     TmrEndLoadingScreen.Enabled := False;
  63. End;
  64.  
  65. End.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement