unit Main;

interface

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

type
  TForm1 = class(TForm)
    Panel1: TPanel;
    Label1: TLabel;
    DimensionLabel: TLabel;
    filenamelbl: TLabel;
    Button1: TButton;
    ScrollBox1: TScrollBox;
    DesktopImg: TImage;
    Label2: TLabel;
    StyleLabel: TLabel;

    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    DeskImg: TDesktopImage;
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
begin
 DeskImg := TDesktopImage.Create(self);
 DeskImg.LoadDesktopSize;
 DimensionLabel.Caption := IntToStr(DeskImg.Width) + ', ' + IntToStr(DeskImg.Height);
 filenamelbl.Caption := DeskImg.Filename;
 StyleLabel.Caption := DeskImg.StyleToStr(DeskImg.WallpaperStyle);

 DesktopImg.Picture.Assign(DeskImg.Picture);
end;

end.
