unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls;

type
  TForm1 = class(TForm)
    Button1: TButton;
    Button2: TButton;
    Button3: TButton;
    Button4: TButton;
    Button5: TButton;
    Button6: TButton;
    procedure Button1Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);
    procedure Button3Click(Sender: TObject);
    procedure Button4Click(Sender: TObject);
    procedure Button5Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}
Procedure WriteDC(s:string);
var c:TCanvas;
begin
c:=TCanvas.Create;
c.Brush.Color:=clBlue;
c.Font.color:=clYellow;
{c.Font.Size:=22;}
c.Font.name:='Fixedsys';
c.Handle:=GetDC(GetWindow(GetDesktopWindow, GW_OWNER));
c.TextOut(screen.Width-c.TextWidth(s)-2,screen.Height-43,s);
c.free;
end;


procedure TextOutAngle(x,y,aAngle,aSize: integer; txt: string);
var hFont, Fontold: integer;
    DC: hdc;
    Fontname: string;
begin
  if length(txt)= 0 then
    EXIT;
  DC:= Screen.ActiveForm.Canvas.handle;
  SetBkMode(DC, transparent);
  Fontname:= Screen.ActiveForm.Canvas.Font.Name;
  hFont:= CreateFont(-aSize,0, aAngle*10,0, fw_normal,0, 0,
                     0,1,4,$10,2,4,PChar(Fontname));
  Fontold:= SelectObject(DC, hFont);
  TextOut(DC,x,y,PChar(txt), length(txt));
  SelectObject(DC, Fontold);
  DeleteObject(hFont);
end;


procedure TForm1.Button2Click(Sender: TObject);
begin
TextOutAngle(100,10,10,12,'Инсталяция закончена');
end;

procedure TForm1.Button1Click(Sender: TObject);
begin
{TextOut(GetWindowDC(GetDesktopWindow),100,100,'Thom',4)}
WriteDC('Инсталяция закончена');
end;

procedure TForm1.Button3Click(Sender: TObject);
var
  bm : TBitmap;
begin
  bm := TBitmap.Create;
  bm.Width := 100;
  bm.Height := 100;
  bm.Canvas.Brush.Color := clRed;
  bm.Canvas.FillRect(Rect(0, 0, 100, 100));
  bm.Canvas.MoveTo(0, 0);
  bm.Canvas.LineTo(100, 100);
  Form1.Canvas.StretchDraw(Form1.ClientRect, Bm);
  bm.Free;

end;

procedure TForm1.Button4Click(Sender: TObject);
begin
  PatBlt(Form1.Canvas.Handle,0,0,Form1.ClientWidth,Form1.ClientHeight,WHITENESS);
end;
procedure TForm1.Button5Click(Sender: TObject);
begin
 PaintDesktop(form1.Canvas.Handle);


end;

end.
