Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- program rofl;
- uses
- Vcl.Forms,
- UnitMain in 'UnitMain.pas' {Form1},
- Vcl.Themes,
- Vcl.Styles,
- System.IOUtils,
- System.SysUtils,
- Winapi.Windows;
- {$R *.res}
- Var
- Style: String;
- Procedure Delay(Value: Cardinal);
- Var
- F, N: Cardinal;
- Begin
- N := 0;
- While N <= (Value Div 10) Do
- Begin
- SleepEx(1, True);
- Application.ProcessMessages;
- Inc(N);
- End;
- F := GetTickCount;
- Repeat
- Application.ProcessMessages;
- N := GetTickCount;
- Until (N - F >= (Value Mod 10)) Or (N < F);
- End;
- begin
- var Styles := TDirectory.GetFiles('C:\Users\Public\Documents\Embarcadero\Studio\21.0\Styles', '*.vsf');
- for Style In Styles Do
- begin
- if not SameText('sky.vsf', ExtractFileName(Style)) Then
- TStyleManager.LoadFromFile(Style);
- end;
- Application.Initialize;
- Application.MainFormOnTaskbar := True;
- TStyleManager.TrySetStyle('Sky');
- for Style in TStyleManager.StyleNames Do
- begin
- var form := TForm1.Create(Application);
- form.StyleName := Style;
- form.Show;
- end;
- Delay(5000);
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement