Unit1.cpp
上传用户:lhxd_sz
上传日期:2014-10-02
资源大小:38814k
文件大小:1k
- //---------------------------------------------------------------------------
- #include <vcl.h>
- #pragma hdrstop
- #include "Unit1.h"
- //---------------------------------------------------------------------------
- #pragma package(smart_init)
- #pragma resource "*.dfm"
- TForm1 *Form1;
- //---------------------------------------------------------------------------
- __fastcall TForm1::TForm1(TComponent* Owner)
- : TForm(Owner)
- {
- }
- //---------------------------------------------------------------------------
- void __fastcall TForm1::CloseControl(int tag)
- {
- int nn,ii;
- nn=ControlCount;
- for(ii=0;ii<nn;ii++)
- {
- if(Controls[ii]->Tag==tag)Controls[ii]->Visible=False;
- }
- }
- //---------------------------------------------------------------------------
- void __fastcall TForm1::TestButton1Click(TObject *Sender)
- {
- CloseControl(1);
- }
- //---------------------------------------------------------------------------
- void __fastcall TForm1::TestButton2Click(TObject *Sender)
- {
- CloseControl(2);
- }
- //---------------------------------------------------------------------------
- void __fastcall TForm1::TestButton3Click(TObject *Sender)
- {
- CloseControl(3);
- }
- //---------------------------------------------------------------------------