PropFrm.cpp
上传用户:daoqigc
上传日期:2021-04-20
资源大小:2795k
文件大小:1k
源码类别:

RichEdit

开发平台:

Delphi

  1. //---------------------------------------------------------------------------
  2. #include <vclvcl.h>
  3. #pragma hdrstop
  4. #include "PropFrm.h"
  5. #include "Unit1.h"
  6. //---------------------------------------------------------------------------
  7. #pragma resource "*.dfm"
  8. TfrmProp *frmProp;
  9. //---------------------------------------------------------------------------
  10. __fastcall TfrmProp::TfrmProp(TComponent* Owner)
  11.     : TForm(Owner)
  12. {
  13. }
  14. //---------------------------------------------------------------------------
  15. void __fastcall TfrmProp::btnChangePictureClick(TObject *Sender)
  16. {
  17.   Form1->OpenDialog1->Title = "Changing Image";
  18. #if __BORLANDC__ > 0x0530
  19.   Form1->OpenDialog1->Filter = "Graphics(*.bmp;*.wmf;*.ico;*.jpg)|*.bmp;*.wmf;*.ico;*.jpg|All(*.*)|*.*";
  20. #else
  21.   Form1->OpenDialog1->Filter = "Graphics(*.bmp;*.wmf;*.ico)|*.bmp;*.wmf;*.ico|All(*.*)|*.*";
  22. #endif
  23.   if (Form1->OpenDialog1->Execute())
  24.     Image1->Picture->LoadFromFile(Form1->OpenDialog1->FileName);
  25. }
  26. //---------------------------------------------------------------------------