//--------------------------------------------------------------------------- #include #pragma hdrstop #include "Unit1.h" //--------------------------------------------------------------------------- #pragma package(smart_init) #pragma resource "*.dfm" TForm1 *Form1; //--------------------------------------------------------------------------- __fastcall TForm1::TForm1(TComponent* Owner) : TForm(Owner) { } //--------------------------------------------------------------------------- void __fastcall TForm1::Button2Click(TObject *Sender) { if(OpenDialog1->Execute()) { Image1->Picture->LoadFromFile(OpenDialog1->FileName); } } //--------------------------------------------------------------------------- void __fastcall TForm1::Button1Click(TObject *Sender) { Image1->Canvas->TextOutA(10,10, Edit1->Text); } //--------------------------------------------------------------------------- void __fastcall TForm1::Button3Click(TObject *Sender) { if(OpenDialog1->Execute()) { Image2->Picture->LoadFromFile(OpenDialog1->FileName); } } //--------------------------------------------------------------------------- void __fastcall TForm1::Button4Click(TObject *Sender) { if(SaveDialog1->Execute()) { Image1->Picture->SaveToFile(SaveDialog1->FileName); } } //--------------------------------------------------------------------------- void __fastcall TForm1::Button5Click(TObject *Sender) { Image1->Canvas->CopyRect(Rect(10,10,Image2->Width+10, Image2->Height+10), Image2->Canvas, Rect(0,0,Image2->Width, Image2->Height)); } //---------------------------------------------------------------------------