unit PrintPreview_SRC;

interface

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

type
  TPreviewPanel = class(TPanel)
  public
    property Canvas;
  end;

  TPrintPreviewForm = class(TForm)
    Panel1: TPanel;
    PrintBtn: TButton;
    CancelBtn: TButton;
    procedure FormCreate(Sender: TObject);
    procedure PrintBtnClick(Sender: TObject);
    procedure CancelBtnClick(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
    PrintPanel : TPreviewPanel;
  end;

var
  PrintPreviewForm: TPrintPreviewForm;

implementation

{$R *.dfm}

procedure TPrintPreviewForm.FormCreate(Sender: TObject);
begin
PrintPanel := TPreviewPanel.Create(Self);
PrintPanel.Parent := Self;
PrintPanel.Align := alClient;
PrintPanel.Color := clWhite;
end;

procedure TPrintPreviewForm.PrintBtnClick(Sender: TObject);
begin
ModalResult := mrOk;
Close;
end;

procedure TPrintPreviewForm.CancelBtnClick(Sender: TObject);
begin
ModalResult := mrCancel;
Close;
end;

end.
