home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 1997 May
/
Pcwk0597.iso
/
borland
/
cb
/
setup
/
cbuilder
/
data.z
/
PREVIEW.CPP
< prev
next >
Wrap
C/C++ Source or Header
|
1997-02-28
|
3KB
|
70 lines
//---------------------------------------------------------------------------
// Borland C++Builder
// Copyright (c) 1987, 1997 Borland International Inc. All Rights Reserved.
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
#include <vcl\vcl.h>
#pragma hdrstop
#include "preview.h"
#include "mainprnt.h"
//---------------------------------------------------------------------------
#pragma link "sampreg"
#pragma resource "*.dfm"
TPrevForm *PrevForm;
//---------------------------------------------------------------------------
__fastcall TPrevForm::TPrevForm(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TPrevForm::ZoomFitBtnClick(TObject *Sender)
{
QRPreview1->ZoomToFit();
SpinZoom->Value=QRPreview1->Zoom;
}
//---------------------------------------------------------------------------
void __fastcall TPrevForm::SpinPageChange(TObject *Sender)
{
QRPreview1->PageNumber=SpinPage->Value;
}
//---------------------------------------------------------------------------
void __fastcall TPrevForm::SpinZoomChange(TObject *Sender)
{
QRPreview1->Zoom=SpinZoom->Value;
}
//---------------------------------------------------------------------------
void __fastcall TPrevForm::FormShow(TObject *Sender)
{
SpinPage->MaxValue=QRPrinter->PageCount;
SpinPage->MinValue=1;
SpinPage->Value=1;
QRPreview1->Zoom=100;
}
//---------------------------------------------------------------------------
void __fastcall TPrevForm::ZoomWidthBtnClick(TObject *Sender)
{
QRPreview1->ZoomToWidth();
SpinZoom->Value=QRPreview1->Zoom;
}
//---------------------------------------------------------------------------
void __fastcall TPrevForm::SpeedButton1Click(TObject *Sender)
{
MainPrintForm->TheReport->Print();
}
//---------------------------------------------------------------------------
void __fastcall TPrevForm::SpeedButton2Click(TObject *Sender)
{
Close();
}
//---------------------------------------------------------------------------
void __fastcall TPrevForm::ExitBtnClick(TObject *Sender)
{
Close();
}
//---------------------------------------------------------------------------
void __fastcall TPrevForm::PrintBtnClick(TObject *Sender)
{
MainPrintForm->TheReport->Print();
}
//---------------------------------------------------------------------------