home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 2003 November
/
PCWK1103B.iso
/
PCWK-txt
/
Warsztat_Cpp_Builder
/
UnitNasycenie.cpp
< prev
next >
Wrap
C/C++ Source or Header
|
2003-09-22
|
2KB
|
52 lines
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "UnitNasycenie.h"
#include "fotoretusz.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TFormNasycenie *FormNasycenie;
//---------------------------------------------------------------------------
__fastcall TFormNasycenie::TFormNasycenie(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TFormNasycenie::tbNasycenieChange(TObject *Sender)
{
edNasycenie->Text = IntToStr( tbNasycenie->Position );
TMemoryStream *pms = new TMemoryStream;
pms->Position = 0;
rys1->Picture->Bitmap->SaveToStream( pms );
pms->Position = 0;
rys2->Picture->Bitmap->LoadFromStream( pms );
delete pms;
DostosujNasycenie( rys2->Picture->Bitmap,tbNasycenie->Position );
}
//---------------------------------------------------------------------------
void __fastcall TFormNasycenie::edNasycenieChange(TObject *Sender)
{
int v;
if( TryStrToInt( edNasycenie->Text,v ) )
tbNasycenie->Position = v;
}
//---------------------------------------------------------------------------
void __fastcall TFormNasycenie::FormShow(TObject *Sender)
{
tbNasycenie->Position = 0;
edNasycenie->Text = "0";
TMemoryStream *pms = new TMemoryStream;
pms->Position = 0;
rys1->Picture->Bitmap->SaveToStream( pms );
pms->Position = 0;
rys2->Picture->Bitmap->LoadFromStream( pms );
delete pms;
}
//---------------------------------------------------------------------------