|
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "Unit1.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
Graphics::TBitmap* gbitmap = new Graphics::TBitmap; <***********************이부분***********
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Button1Click(TObject *Sender)
{
OpenDialog1->Execute(); ***********************이부분***********>
String fileName;
fileName = OpenDialog1->FileName;
gbitmap->LoadFromFile(fileName);
Image1->Picture->LoadFromFile(fileName);
PaintBox1->Canvas->Draw(0,0,gbitmap); <***********************이부분***********
}
//---------------------------------------------------------------------------
|