unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, ExtCtrls,jpeg, StdCtrls,mystr,mygraph;
type
  TForm1 = class(TForm)
    Button1: TButton;
    Image1: TImage;
    procedure Button1Click(Sender: TObject);
    procedure FormCreate(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;
MyJpeg: TJpegImage;
implementation

{$R *.dfm}




procedure TForm1.Button1Click(Sender: TObject);
begin
Image1.Picture.Bitmap:=CaptureScreen;
MyJpeg.Assign(Image1.Picture.Bitmap);
MyJpeg.SaveToFile('Proba.jpg');

end;


procedure TForm1.FormCreate(Sender: TObject);
begin
  MyJpeg:= TJpegImage.Create;

end;

end.
