PropFrm.cpp
上传用户:daoqigc
上传日期:2021-04-20
资源大小:2795k
文件大小:1k
- //---------------------------------------------------------------------------
- #include <vclvcl.h>
- #pragma hdrstop
- #include "PropFrm.h"
- #include "Unit1.h"
- //---------------------------------------------------------------------------
- #pragma resource "*.dfm"
- TfrmProp *frmProp;
- //---------------------------------------------------------------------------
- __fastcall TfrmProp::TfrmProp(TComponent* Owner)
- : TForm(Owner)
- {
- }
- //---------------------------------------------------------------------------
- void __fastcall TfrmProp::btnChangePictureClick(TObject *Sender)
- {
- Form1->OpenDialog1->Title = "Changing Image";
- #if __BORLANDC__ > 0x0530
- Form1->OpenDialog1->Filter = "Graphics(*.bmp;*.wmf;*.ico;*.jpg)|*.bmp;*.wmf;*.ico;*.jpg|All(*.*)|*.*";
- #else
- Form1->OpenDialog1->Filter = "Graphics(*.bmp;*.wmf;*.ico)|*.bmp;*.wmf;*.ico|All(*.*)|*.*";
- #endif
- if (Form1->OpenDialog1->Execute())
- Image1->Picture->LoadFromFile(Form1->OpenDialog1->FileName);
- }
- //---------------------------------------------------------------------------